pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #7804: timeofday() output string is not compatible with "timestamp with time zone" data type
3+ messages / 3 participants
[nested] [flat]
* BUG #7804: timeofday() output string is not compatible with "timestamp with time zone" data type
@ 2013-01-14 05:28 dotbrat@gmail.com
2013-01-14 18:13 ` Re: BUG #7804: timeofday() output string is not compatible with "timestamp with time zone" data type Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 3+ messages in thread
From: dotbrat@gmail.com @ 2013-01-14 05:28 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 7804
Logged by: Ruslan Izmaylov
Email address: dotbrat@gmail.com
PostgreSQL version: 9.1.7
Operating system: Fedora release 17
Description:
Query:
SET TIME ZONE 'Europe/Minsk';
select timeofday()::timestamp with time zone;
Result:
ERROR: invalid input syntax for type timestamp with time zone: "Mon Jan 14
08:18:20.333915 2013 FET"
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #7804: timeofday() output string is not compatible with "timestamp with time zone" data type
2013-01-14 05:28 BUG #7804: timeofday() output string is not compatible with "timestamp with time zone" data type dotbrat@gmail.com
@ 2013-01-14 18:13 ` Tom Lane <tgl@sss.pgh.pa.us>
2013-01-14 18:38 ` Re: BUG #7804: timeofday() output string is not compatible with "timestamp with time zone" data type Руслан Измайлов <dotbrat@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Tom Lane @ 2013-01-14 18:13 UTC (permalink / raw)
To: dotbrat@gmail.com; +Cc: pgsql-bugs
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
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #7804: timeofday() output string is not compatible with "timestamp with time zone" data type
2013-01-14 05:28 BUG #7804: timeofday() output string is not compatible with "timestamp with time zone" data type dotbrat@gmail.com
2013-01-14 18:13 ` Re: BUG #7804: timeofday() output string is not compatible with "timestamp with time zone" data type Tom Lane <tgl@sss.pgh.pa.us>
@ 2013-01-14 18:38 ` Руслан Измайлов <dotbrat@gmail.com>
0 siblings, 0 replies; 3+ messages in thread
From: Руслан Измайлов @ 2013-01-14 18:38 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: 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
>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2013-01-14 18:38 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-01-14 05:28 BUG #7804: timeofday() output string is not compatible with "timestamp with time zone" data type dotbrat@gmail.com
2013-01-14 18:13 ` Tom Lane <tgl@sss.pgh.pa.us>
2013-01-14 18:38 ` Руслан Измайлов <dotbrat@gmail.com>
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