help: now() + N is now failing!

Поиск
Список
Период
Сортировка
От Mel Jamero
Тема help: now() + N is now failing!
Дата
Msg-id 000901c355b0$b6f65d70$1b06a8c0@CMPMEL
обсуждение исходный текст
Ответы Re: help: now() + N is now failing!  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: help: now() + N is now failing!  (Dmitry Tkach <dmitry@openratings.com>)
Список pgsql-novice
help.  does anybody know how, without using date_pli, i can make now() + N
work in newer versions of postgres?

we ported our old data to a new db.

VALUE = NULL doesn't work anymore, had to use IS NULL.  had to modify
hundred liners of scripts :(

i don't wanna go about modifying all the scripts again to modify now() + N
in my old scripts.

i've been a victim of backwards compatibility issue and late side-effect of
my DB infancy sydrome years ago :(

TIA!

--OLD postgres

old_postgres=# select now();
          now
------------------------
 2003-07-29 16:11:11+08
(1 row)

old_postgres=# select now() + 2;
  ?column?
------------
 2003-07-31
(1 row)

-- NEW postgres

new_postgres=# select now();
              now
-------------------------------
 2003-07-29 16:31:39.494534+08
(1 row)

new_postgres=# select now() + 2;
ERROR:  Unable to identify an operator '+' for types 'timestamp with time
zone' and 'integer'
        You will have to retype this query using an explicit cast


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

Предыдущее
От: "Henshall, Stuart - TNP Southwest"
Дата:
Сообщение: Re: dynamic sql statements and OUT variables
Следующее
От: "Mel Jamero"
Дата:
Сообщение: any idea regarding this error?