From: Joel Burton <joel@joelburton.com>
To: Edipo E. F. Melo <edipoelder@ig.com.br>
To: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: Casting timestamp
Date: Sun, 19 May 2002 09:43:04 -0400
Message-ID: <JGEPJNMCKODMDHGOBKDNAELLCOAA.joel@joelburton.com> (raw)
In-Reply-To: <20020519125527.BF7D14758D7@postgresql.org>
> -----Original Message-----
> From: pgsql-sql-owner@postgresql.org
> [mailto:pgsql-sql-owner@postgresql.org]On Behalf Of Edipo E. F. Melo
> Sent: Saturday, May 18, 2002 7:55 PM
> To: pgsql-sql
> Subject: [SQL] Casting timestamp
>
>
> Hi all,
>
> I posting this again...
>
> Why the second casting don't work?
>
> --- start with this
> set datestyle = 'iso';
> show datestyle;
> select current_timestamp::text::timestamp;
> --- now try this
> set datestyle = 'postgres';
> show datestyle;
> select current_timestamp::text::timestamp;
>
> In the first one, I get
> timestamptz
> -------------------------------
> 2002-05-13 10:19:55.158434-03
>
> In the last one, I get
> ERROR: Bad timestamp external representation 'Mon May 13 10:19:56.671847
> 2002 BRT'
Edipo --
The second csating doesn't work because PG doesn't recognize the time zone
"BRT" -- despite the fact that it appeared to output it (!). [Full list of
PG timezones at
http://candle.pha.pa.us/main/writings/pgsql/sgml/timezones.html)
What output do you get from
SET DATESTYLE='iso';
SELECT current_timestamp;
SET DATESTYLE='postgres';
SELECT current_timestamp;
And where are you located geographically?
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-sql@postgresql.org
Cc: joel@joelburton.com, edipoelder@ig.com.br
Subject: Re: Casting timestamp
In-Reply-To: <JGEPJNMCKODMDHGOBKDNAELLCOAA.joel@joelburton.com>
* 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