Subject: Specified date type but created column is timestamp without time zone

From: Mike Elston <[email-masked]>
Date: Sun, 7 Nov 2021 08:11:32 +1300

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

---

From: Tom Lane <[email-masked]>
Date: Sat, 06 Nov 2021 15:31:18 -0400

> psql (EnterpriseDB) 13.4.8

If you're using EDB, their server is hacked in a lot of ways to act
more like Oracle, and I think this discrepancy is one of them.
Oracle's idea of "date" corresponds more or less to our "timestamp",
so they translate.

			regards, tom lane