BUG #5132: Invalid Function

Started by Geok Hua Yapover 16 years ago3 messagesbugs
Jump to latest
#1Geok Hua Yap
geokhua8888@yahoo.com.sg

The following bug has been logged online:

Bug reference: 5132
Logged by: Geok Hua Yap
Email address: geokhua8888@yahoo.com.sg
PostgreSQL version: 8.3.1
Operating system: CentOS 5.2
Description: Invalid Function
Details:

select timeofday()::timestamp;
ERROR: invalid input syntax for type timestamp: "Thu Oct 22 15:16:25.113963
2009 SGT"

#2Robert Haas
robertmhaas@gmail.com
In reply to: Geok Hua Yap (#1)
Re: BUG #5132: Invalid Function

On Thu, Oct 22, 2009 at 3:23 AM, Geok Hua Yap <geokhua8888@yahoo.com.sg> wrote:

The following bug has been logged online:

Bug reference:      5132
Logged by:          Geok Hua Yap
Email address:      geokhua8888@yahoo.com.sg
PostgreSQL version: 8.3.1
Operating system:   CentOS 5.2
Description:        Invalid Function
Details:

select timeofday()::timestamp;
ERROR:  invalid input syntax for type timestamp: "Thu Oct 22 15:16:25.113963
2009 SGT"

This is not a bug. timeofday() returns text - maybe you want clock_timestamp()?

http://www.postgresql.org/docs/current/interactive/functions-datetime.html

...Robert

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Geok Hua Yap (#1)
Re: BUG #5132: Invalid Function

"Geok Hua Yap" <geokhua8888@yahoo.com.sg> writes:

select timeofday()::timestamp;
ERROR: invalid input syntax for type timestamp: "Thu Oct 22 15:16:25.113963
2009 SGT"

SGT was added to the default set of timezone abbreviations as of 8.4.
If you want to use Singapore timezone in 8.3, you'll probably want to
add it to your local copy of that configuration file. See
http://www.postgresql.org/docs/8.3/static/datetime-config-files.html

regards, tom lane