Re: bug?
От | Laurette Cisneros |
---|---|
Тема | Re: bug? |
Дата | |
Msg-id | Pine.LNX.4.44.0212061712340.9186-100000@visor.corp.nextbus.com обсуждение исходный текст |
Ответ на | Re: bug? (Oskar Berggren <beo@sgs.o.se>) |
Список | pgsql-general |
Doh! Duh! Thanks! On Sat, 7 Dec 2002, Oskar Berggren wrote: > Laurette Cisneros wrote: > > What is the difference between these two queries? Is this a bug? > > > > > select case when current_timestamp < '2002-12-06'::date + 1 > > > select case when current_timestamp < '2002-12-06'::date + 1::interval > > Yes there is a difference: > > select '2002-12-06'::date + 1; > ?column? > ------------ > 2002-12-07 > (1 row) > > > select '2002-12-06'::date + 1::interval; > ?column? > ------------------------ > 2002-12-06 00:00:01+01 > (1 row) > > > As you can see, 1::interval means one second, not one day. > > /Oskar > -- Laurette Cisneros The Database Group (510) 420-3137 NextBus Information Systems, Inc. www.nextbus.com ---------------------------------- There's more to life than just SQL.
В списке pgsql-general по дате отправления: