Re: Conversion to 8.3

Поиск
Список
Период
Сортировка
От Terry Lee Tucker
Тема Re: Conversion to 8.3
Дата
Msg-id 200804041651.08324.terry@turbocorp.com
обсуждение исходный текст
Ответ на Re: Conversion to 8.3  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Friday 04 April 2008 16:36, Tom Lane wrote:
> Terry Lee Tucker <terry@chosen-ones.org> writes:
> > I am converting our application from 7.4.19 to 8.3.1. In the old scheme
> > of things, I was generating an interval between two timestamps and
> > evaluating the interval string in another set of trigger code. I was
> > doing the following:
> > IF new.ontime IS NOT NULL AND new.ontime ~* 'ago' THEN
> > With the new casting rules, this doesn't work.
>
> Well, you could force it to work by casting new.ontime to text
> explicitly, but this is a pretty horrid way of testing for a negative
> interval anyhow.  I'd be inclined to do something like
>  new.ontime < '0 seconds'
>
> BTW, the IS NOT NULL test is redundant too, since the comparison
> can't succeed for a null.
>
>    regards, tom lane

Thanks Tom. That's what I'm looking for.

--
Terry Lee Tucker
Turbo's IT Manager
Turbo, division of Ozburn-Hessey Logistics
2251 Jesse Jewell Pkwy NE
Gainesville, GA 30501
Tel: (336) 372-6812  Fax: (336) 372-6812  Cell: (336) 404-6987
terry@turbocorp.com
www.turbocorp.com

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

Предыдущее
От: "Brent Wood"
Дата:
Сообщение: Re: pg_dump and schemas
Следующее
От: Benoît Carpentier
Дата:
Сообщение: Benetl 1.7, free ETL tool using postgreSQL is out !!!