Re: Extended unit

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Extended unit
Дата
Msg-id 8002.1106693926@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Extended unit  (Pailloncy Jean-Gerard <jg@rilk.com>)
Ответы Re: Extended unit  (Richard Huxton <dev@archonet.com>)
Список pgsql-general
Pailloncy Jean-Gerard <jg@rilk.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

В списке pgsql-general по дате отправления:

Предыдущее
От: David Siebert
Дата:
Сообщение: Problem with Postgres V 8 and DBI maybe
Следующее
От: David Garamond
Дата:
Сообщение: Re: EMBEDDED PostgreSQL