Re: BUG?: timestamp without TZ created as timestamp *with* TZ
| От | Tom Lane |
|---|---|
| Тема | Re: BUG?: timestamp without TZ created as timestamp *with* TZ |
| Дата | |
| Msg-id | 25828.1030629404@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | BUG?: timestamp without TZ created as timestamp *with* TZ (Jean-Christian Imbeault <jc@mega-bucks.co.jp>) |
| Ответы |
Re: BUG?: timestamp without TZ created as timestamp
|
| Список | pgsql-general |
Jean-Christian Imbeault <jc@mega-bucks.co.jp> writes:
> It seems that even though I declare a columns to be of type timestamp
> without time zone it gets created as a data type *with* a time zone?
That is the behavior in 7.2; it's a transient state to help people
migrate from our old not-very-SQL-compliant datatype names.
In 7.3 "timestamp" will mean "timestamp without time zone" per spec.
> Here my SQL:
> create table MEMBERS (
> last_login timestamp without time zone [0],
> );
> I then do a "\d members" and get:
> last_login | timestamp with time zone[] |
There's also a nasty little bug in the 7.2 system catalogs: the
array-of-timestamp-without-tz datatype is mistakenly linked to the
timestamp-with-tz element type. You can fix this with a quick UPDATE to
pg_type; in the source code the correction looks like
403c403
< DATA(insert OID = 1115 ( _timestamp PGUID -1 -1 f b t \054 0 1184 array_in array_out array_in array_out d x
_null_));
---
> DATA(insert OID = 1115 ( _timestamp PGUID -1 -1 f b t \054 0 1114 array_in array_out array_in array_out d x
_null_));
The actual SQL command to give is in the archives somewhere, if you
need more help.
regards, tom lane
В списке pgsql-general по дате отправления: