pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hannu Krosing <hannu@tm.ee>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: cnliou@so-net.net.tw
Cc: pgsql-docs@postgresql.org
Subject: Re: Inserting timestamp values
Date: Tue, 02 Dec 2003 22:32:53 +0200
Message-ID: <1070397173.4788.1.camel@fuji.krosing.net> (raw)
In-Reply-To: <17289.1070383257@sss.pgh.pa.us>
References: <1070382243.61976.cnliou@so-net.net.tw>
	<17289.1070383257@sss.pgh.pa.us>

Tom Lane kirjutas T, 02.12.2003 kell 18:40:
> "cnliou" <cnliou@so-net.net.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



view thread (3+ messages)

Message-ID: <1070397173.4788.1.camel@fuji.krosing.net>
Permalink:  ../1070397173.4788.1.camel@fuji.krosing.net/
Also on:    postgresql.org/message-id/1070397173.4788.1.camel@fuji.krosing.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: hannu@tm.ee, tgl@sss.pgh.pa.us, cnliou@so-net.net.tw
  Subject: Re: Inserting timestamp values
  In-Reply-To: <1070397173.4788.1.camel@fuji.krosing.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox