Re: Inserting timestamp values

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: cnliou(at)so-net(dot)net(dot)tw, pgsql-docs(at)postgresql(dot)org
Subject: Re: Inserting timestamp values
Date: 2003-12-02 20:32:53
Message-ID: 1070397173.4788.1.camel@fuji.krosing.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

Tom Lane kirjutas T, 02.12.2003 kell 18:40:
> "cnliou" <cnliou(at)so-net(dot)net(dot)tw> writes:
> > Does my test result comply with the statements in section
> > "8.5 Date/Time Types"?
>
> I think so. You are inserting into a timestamp-with-time-zone column,
> so even though you mark the literal constant as timestamp without time
> zone, it's going to be converted to timestamp with time zone.

Maybe he is wondering about it getting converted to +8 time zone even
when the time zone is 'unknown' :

> but my test results seem to show the other way.
>
> db1=# show time zone;
> TimeZone
> ----------
> unknown
> (1 row)
>
> db1=# \d test
> Table "public.test"
> Column | Type | Modifiers
> --------+--------------------------+-----------
> f1 | timestamp with time zone |
>
> db1=# insert into test values ('2003-1-1'::timestamp);
> INSERT 46230 1
> db1=# select * from test;
> f1
> ------------------------
> 2003-01-01 00:00:00+08

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Adam DiCarlo 2003-12-05 04:58:53 Re: docbook-dsssl help
Previous Message Tom Lane 2003-12-02 16:40:57 Re: Inserting timestamp values