Re: Extended unit

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pailloncy Jean-Gerard <jg(at)rilk(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Extended unit
Date: 2005-01-25 22:58:46
Message-ID: 8002.1106693926@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Pailloncy Jean-Gerard <jg(at)rilk(dot)com> writes:
> I do not want for each column and each row to store the value and the
> unit.

> I do want to put the unit in the definition of the column and the check
> on the parser before any execution.

If you do that, you foreclose the ability to store mixed values in a
single column, in return for what? Saving a couple of bytes per value?
(I suppose that in a serious implementation we'd store the units as some
sort of reference, not as a string.) Compare the implementation of the
NUMERIC type: you *can* constrain a column to have a fixed precision,
but you do not *have* to.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Garamond 2005-01-25 23:06:37 Re: EMBEDDED PostgreSQL
Previous Message Tom Lane 2005-01-25 22:51:47 Opening stdin/stdout in binary mode on Windows