Re: BUG #7804: timeofday() output string is not compatible with "timestamp with time zone" data type - Mailing list pgsql-bugs

From Руслан Измайлов
Subject Re: BUG #7804: timeofday() output string is not compatible with "timestamp with time zone" data type
Date
Msg-id CABoaF20aGtbfLiDUUCNaRB-T9t3d4St_FBeFCx5Zh=CsSQVpnQ@mail.gmail.com
Whole thread
In response to Re: BUG #7804: timeofday() output string is not compatible with "timestamp with time zone" data type  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
I need a real-time clock value so I will use clock_timestamp() to get it. Thanks for the answer.


2013/1/15 Tom Lane <tgl@sss.pgh.pa.us>
dotbrat@gmail.com writes:
> SET TIME ZONE 'Europe/Minsk';
> select timeofday()::timestamp with time zone;
> ERROR: invalid input syntax for type timestamp with time zone: "Mon Jan 14
> 08:18:20.333915 2013 FET"

The issue seems to be that the recently-invented abbreviation FET
isn't anywhere in our default list of timezone abbreviations.

That probably should be fixed, but in the meantime, you really should be
aware that timeofday() is deprecated, and there's no reason at all to
use it in the above manner anyway.  now() or current_timestamp are
simpler and much faster.

                        regards, tom lane

pgsql-bugs by date:

Previous
From: joe@tanga.com
Date:
Subject: BUG #7809: Running pg_dump on slave w/ streaming replication fails if there are unlogged tables
Next
From: richardbrown360@hotmail.com
Date:
Subject: BUG #7810: cant uninstall or install program