to_timestamp error between postgres version 8.3 and 9.2

Поиск
Список
Период
Сортировка
От Technical Doubts
Тема to_timestamp error between postgres version 8.3 and 9.2
Дата
Msg-id CAJyuQsEP6af-MzxS=utG_4AN9ziHyDEOLSmecTiRt-fD7i+jCg@mail.gmail.com
обсуждение исходный текст
Ответы Re: to_timestamp error between postgres version 8.3 and 9.2  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: to_timestamp error between postgres version 8.3 and 9.2  (françois Figarola<francois.figarola@laposte.net>)
Список pgsql-admin
 
Dear Team,
 
I have a table with name registers_info with below columns

regid character varying,
transid bigint,
regdate timestamp without time zone,
canceldate timestamp without time zone


insert into registers_info (regid,transid,regdate,canceldate) values
('reg1',1,to_timestamp('2013-07-24','yyyy-MM-dd hh24:mi:ss')::TIMESTAMP,to_timestamp('null','yyyy-MM-dd
hh24:mi:ss')::TIMESTAMP);

The above query works fine in Postgres 8.3 version.

But the same query when executed in postgres 9.2 its throwing below error

ERROR: invalid value "null" for "yyyy"
Detail: Value must be an integer.

From application, this cancel date might have values or it may come as null.
 
Kindly suggest. Thanks in advance.
 
 
--
John

В списке pgsql-admin по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [GENERAL] Using of replication by initdb for both nodes?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: to_timestamp error between postgres version 8.3 and 9.2