From: | John Smithus <smithus(dot)john(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Time zone HADT timestamp syntax error in trigger |
Date: | 2009-04-30 18:38:00 |
Message-ID: | f4eea4e90904301138m1ebc9ec5u770c8ba9adea499e@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Greetings!
I'm encountering an "invalid input syntax for type timestamp" error in
a trigger.
The server is running PostgreSQL 8.3.7 on an AMD64 Gentoo Linux
machine. The system time zone is set to 'America/Adak' and datestyle
is set to 'sql, mdy' in postgresql.conf.
The target column type is "timestamp (0) with time zone", but for
testing, I am able to duplicate the results using the trigger example
located at the following location:
http://www.postgresql.org/docs/8.3/interactive/plpgsql-trigger.html#PLPGSQL-TRIGGER-EXAMPLE
I create a new database, create the example table, function, and
trigger, and then perform the following query is psql:
INSERT INTO emp (empname, salary) VALUES ('John', '3000');
It immediately returns with:
ERROR: invalid input syntax for type timestamp: "04/30/2009
08:48:05.760442 HADT"
CONTEXT: PL/pgSQL function "emp_stamp" line 16 at assignment
As I mentioned, I'm actually targeting a column type of "timestamp (0)
with time zone", but I'd like to know what modification should be done
to that trigger example to allow the assignment to succeed.
Any advice is greatly appreciated.
Thank you very much!
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2009-04-30 19:30:33 | Re: How to begin to debug FATAL: invalid frontend message type 77 error messages? |
Previous Message | Alan Hodgson | 2009-04-30 18:29:17 | Re: possible consistency problem |