default localtimestamp at time zone

Started by Peter Eisentrautover 15 years ago2 messageshackers
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

Oddly, this doesn't work:

create table test (x timestamp default localtimestamp at time zone 'UTC');
ERROR: 42601: syntax error at or near "at"

(Parentheses help.)

The attached patch fixes it. Is there any reason for this omission?

(The patch also works in past releases, so it was not obviously a parser
problem.)

Attachments:

default-localtimestamp-at-time-zone.patchtext/x-patch; charset=UTF-8; name=default-localtimestamp-at-time-zone.patchDownload+13-0
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Peter Eisentraut (#1)
Re: default localtimestamp at time zone

Peter Eisentraut <peter_e@gmx.net> writes:

Oddly, this doesn't work:
create table test (x timestamp default localtimestamp at time zone 'UTC');
ERROR: 42601: syntax error at or near "at"

(Parentheses help.)

The attached patch fixes it. Is there any reason for this omission?

I'm not really thrilled about adding low-usage options to b_expr. That
could back us into a corner later, by preventing b_expr from being used
in someplace where it'd be desirable.

regards, tom lane