Re: [QUESTIONS] select date('now'::datetime+'30 day'::timespan)

Поиск
Список
Период
Сортировка
От Brett McCormick
Тема Re: [QUESTIONS] select date('now'::datetime+'30 day'::timespan)
Дата
Msg-id 199801280003.QAA11790@abraxas.scene.com
обсуждение исходный текст
Список pgsql-hackers
I was just using 30 days because that's what the previous fellow used..
it works, but some of the time conversion routines are still messed up.

select date('now'::datetime),date(datetime(date('now'::datetime)));
      date|      date
----------+----------
01-27-1998|01-26-1998
(1 row)

those should be the same correct?  it appears to get messed up in the
datetime(date) conversion..

--brett

On Tue, 27 January 1998, at 08:21:22, Thomas G. Lockhart wrote:

> btw, if you want to add a month, better to use
>
> postgres=> select date( cast 'now'::date as datetime + '1
> month'::timespan);
>       date
> ----------
> 02-27-1998
> (1 row)
>
> (The important thing is the '1 month' time span; ignore the casting
> until v6.3 :)

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

Предыдущее
От: Brett McCormick
Дата:
Сообщение: Re: [HACKERS] A small type extension example for the contrib directory (fwd)
Следующее
От: darrenk@insightdist.com (Darren King)
Дата:
Сообщение: Re: [HACKERS] No: implied sort with group by