Casting timestamp

From: "Edipo E(dot) F(dot) Melo" <edipoelder(at)ig(dot)com(dot)br>
To: "pgsql-sql" <pgsql-sql(at)postgresql(dot)org>
Subject: Casting timestamp
Date: 2002-05-18 23:54:56
Message-ID: 20020519125527.BF7D14758D7@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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'

[]'s

Edipo Elder F. de Melo

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Joel Burton 2002-05-19 13:43:04 Re: Casting timestamp
Previous Message Tom Lane 2002-05-18 02:04:27 Re: PL/pgSQL TODO