Re: Native type for storing fractions (e.g 1/3)?

From: Stephane Bortzmeyer <bortzmeyer(at)nic(dot)fr>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-general(at)postgresql(dot)org, Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>, Ken Johanson <pg-user(at)kensystem(dot)com>
Subject: Re: Native type for storing fractions (e.g 1/3)?
Date: 2007-03-15 13:07:41
Message-ID: 20070315130741.GA5993@nic.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Mar 15, 2007 at 07:41:18AM +0100,
Peter Eisentraut <peter_e(at)gmx(dot)net> wrote
a message of 22 lines which said:

> His goal may be to store and compute rational numbers exactly. The
> answer is that there is no data type in PostgreSQL that supports
> this.

But he can write one in PostgreSQL quite easily. Rational numbers are
always the first exercice in CS courses about Abstract Data Types :-)

http://www.postgresql.org/docs/8.0/interactive/xtypes.html

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alexi Gen 2007-03-15 13:38:20 Role & User - Inheritance?
Previous Message Ron Johnson 2007-03-15 13:00:32 Re: Native type for storing fractions (e.g 1/3)?