From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Thomas Lockhart <lockhart(at)fourpalms(dot)org> |
Cc: | Arguile <arguile(at)lucentstudios(dot)com>, PostgreSQL Hackers List <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Timezone Inconsistancies |
Date: | 2002-02-26 04:05:23 |
Message-ID: | 27031.1014696323@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Thomas Lockhart <lockhart(at)fourpalms(dot)org> writes:
>> ... The only way to cast to
>> timestamp without tz is CAST( ... without time zone) as far as I can tell;
>> as ::timestamp(p) doesn't work nor the w/ w/o tz in that style of casting.
> Right. The double-colon syntax is an ancient PgSQL-ism. Use cast()
> instead to get the greatest variety of syntax in coersions.
AFAICT, double-colon accepts exactly the same range of type names as CAST
does. For example:
regression=# select 'now'::timestamp(3);
timestamptz
----------------------------
2002-02-25 22:58:44.796-05
(1 row)
regression=# select 'now'::timestamp(3) with time zone;
timestamptz
----------------------------
2002-02-25 23:00:04.235-05
(1 row)
regression=# select 'now'::timestamp(3) without time zone;
timestamp
-------------------------
2002-02-25 23:00:08.075
(1 row)
regression=# select 'now'::"timestamp";
timestamp
----------------------------
2002-02-25 23:00:17.104784
(1 row)
regression=# select 'now'::"timestamptz";
timestamptz
-------------------------------
2002-02-25 23:00:19.644908-05
(1 row)
>> Among other fun new timestamp changes ;)
> Enjoy ;)
Yup, we've got some. But hey, SQL99 compliance is good for you ;-)
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Lockhart | 2002-02-26 04:11:05 | Re: More time zones |
Previous Message | Thomas Lockhart | 2002-02-26 03:53:53 | Re: Timezone Inconsistancies |