Specified date type but created column is timestamp without time zone - Mailing list pgsql-novice

From Mike Elston
Subject Specified date type but created column is timestamp without time zone
Date
Msg-id CAAvyBqHCrx2z4EUhSHYRNCvAj2b82=fNcmAdhCj_r3tuM_qL7w@mail.gmail.com
Whole thread Raw
Responses Re: Specified date type but created column is timestamp without time zone
List 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 by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Error when pgadmin starts
Next
From: Tom Lane
Date:
Subject: Re: Specified date type but created column is timestamp without time zone