pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedCasting timestamp
3+ messages / 2 participants
[nested] [flat]
* Casting timestamp
@ 2002-05-18 23:54 Edipo E. F. Melo <edipoelder@ig.com.br>
2002-05-19 13:43 ` Re: Casting timestamp Joel Burton <joel@joelburton.com>
0 siblings, 1 reply; 3+ messages in thread
From: Edipo E. F. Melo @ 2002-05-18 23:54 UTC (permalink / raw)
To: 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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Casting timestamp
2002-05-18 23:54 Casting timestamp Edipo E. F. Melo <edipoelder@ig.com.br>
@ 2002-05-19 13:43 ` Joel Burton <joel@joelburton.com>
2002-05-19 20:43 ` Re: Casting timestamp Edipo E. F. Melo <edipoelder@ig.com.br>
0 siblings, 1 reply; 3+ messages in thread
From: Joel Burton @ 2002-05-19 13:43 UTC (permalink / raw)
To: Edipo E. F. Melo <edipoelder@ig.com.br>; pgsql-sql
> -----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?
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Casting timestamp
2002-05-18 23:54 Casting timestamp Edipo E. F. Melo <edipoelder@ig.com.br>
2002-05-19 13:43 ` Re: Casting timestamp Joel Burton <joel@joelburton.com>
@ 2002-05-19 20:43 ` Edipo E. F. Melo <edipoelder@ig.com.br>
0 siblings, 0 replies; 3+ messages in thread
From: Edipo E. F. Melo @ 2002-05-19 20:43 UTC (permalink / raw)
To: pgsql-sql
On Sun, 19 May 2002 09:43:04 -0400, Joel Burton wrote:
>> 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)
Ok. I will try some confs next monday. (The server is at work)
>What output do you get from
>
>SET DATESTYLE='iso';
>SELECT current_timestamp;
>SET DATESTYLE='postgres';
>SELECT current_timestamp;
bench=# SET DATESTYLE='iso';
SET VARIABLE
bench=# SELECT current_timestamp;
timestamptz
-------------------------------
2002-05-19 17:37:12.617842-03
(1 row)
bench=# SET DATESTYLE='postgres';
SET VARIABLE
bench=# SELECT current_timestamp;
timestamptz
-------------------------------------
Sun May 19 17:37:14.144733 2002 BRT
(1 row)
>And where are you located geographically?
Brazil, Rio Grande do Norte, Natal.
http://www.mapquest.com/maps/map.adp?zoom=0&mapdata=1FkKZg0N7LmqNpewo16MXL%2faxoMdIexib8Fmh8NEuL...
2fpYs2AOLhVjNTzqyOmiu%2f3aWdA2FLUXHfelRY3Uo7w1EvAuROTwR4nQJWxe6SarHXPaqh5CKM36kni4N2Su351LXh5nGHrS%2fe5ZbI292rCxqIg%
2fLeCXhGtDD%2b5W4jkwM3s9s0S0Q%2bGqQdq4REF4aRET8EBFDAYUuBw7BXdOEd%2fHGCcOs3MTKBAyU2i8noDt%2fI0QeM38CI1A7uqymkh%
2fta59Zq6efUe0QuYcJSb1ekJbNE%2bkdX0UKtAkBeLNWr%2b%2bzLEu0rOny6DTLnLC3BTQItOmpWg3C6X1T%2fKtEQ%3d%3d
(sorry for big link above. I'm the red star on map.)
[]'s
Edipo Elder F. de Melo
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2002-05-19 20:43 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-05-18 23:54 Casting timestamp Edipo E. F. Melo <edipoelder@ig.com.br>
2002-05-19 13:43 ` Joel Burton <joel@joelburton.com>
2002-05-19 20:43 ` Edipo E. F. Melo <edipoelder@ig.com.br>
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