Re: pg_attribute.atttypmod for interval type

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_attribute.atttypmod for interval type
Дата
Msg-id 1913262.1722054745@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pg_attribute.atttypmod for interval type  (Greg Rychlewski <greg.rychlewski@gmail.com>)
Список pgsql-hackers
Greg Rychlewski <greg.rychlewski@gmail.com> writes:
> My question is: how are the values meant to be interpreted for interval
> types? Thanks very much for your help.

Interval typmods include a fractional-seconds-precision field as well
as a bitmask indicating the allowed interval fields (per the SQL
standard's weird syntax such as INTERVAL DAY TO SECOND).  Looking at
the source code for intervaltypmodout() might be helpful:


https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/utils/adt/timestamp.c;h=69fe7860ede062fc8be42e7545b35e69c3e068c4;hb=HEAD#l1136

The referenced macros are mostly in utils/timestamp.h and
utils/datetime.h.

            regards, tom lane



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

Предыдущее
От: Greg Rychlewski
Дата:
Сообщение: pg_attribute.atttypmod for interval type
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: Protocol question regarding Portal vs Cursor