Specified date type but created column is timestamp without time zone

Поиск
Список
Период
Сортировка
От Mike Elston
Тема Specified date type but created column is timestamp without time zone
Дата
Msg-id CAAvyBqHCrx2z4EUhSHYRNCvAj2b82=fNcmAdhCj_r3tuM_qL7w@mail.gmail.com
обсуждение исходный текст
Ответы Re: Specified date type but created column is timestamp without time zone  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
Hi

I created a table containing a column of type "date" but the describe command reports that the created column is "timestamp without time zone". Why isn't it simply "date"?

psql (EnterpriseDB) 13.4.8 

mifis=> create table test (test_date date);
CREATE TABLE
mifis=> describe test;
                           Table "public.test"
  Column   |            Type             | Collation | Nullable | Default
-----------+-----------------------------+-----------+----------+---------
 test_date | timestamp without time zone |           |          |


According to https://www.postgresql.org/docs/9.1/datatype-datetime.html date is a distinct type occupying four bytes whereas timestamp without time zone occupies 8 bytes.

Thanks

Mike

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Error when pgadmin starts
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Specified date type but created column is timestamp without time zone