Re: [HACKERS] Bug: timestamp without time zone column allows timestamptz default

2017-03-14 Thread Tom Lane
David Fetter writes: > CREATE TABLE bar(t TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP); > This is a foot gun we need not have. Yes, we do need to have it. (1) if we remove the implicit cast from timestamptz to timestamp, the villagers will be on our doorsteps with the usual equipm

[HACKERS] Bug: timestamp without time zone column allows timestamptz default

2017-03-14 Thread David Fetter
Folks, What happens now: CREATE TABLE bar(id int DEFAULT 'a'); ERROR: invalid input syntax for integer: "a" Good so far. Now with a different data type. CREATE TABLE bar(t TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP); CREATE TABLE This is a foot gun we need not have