Re: Is this a bug? : select '26/10/2003'::date + interval '1 day';

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Is this a bug? : select '26/10/2003'::date + interval '1 day';
Дата
Msg-id 19453.1053618245@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Is this a bug? : select '26/10/2003'::date + interval '1 day';  (Conxita Marín <comarin@telefonica.net>)
Список pgsql-general
=?iso-8859-1?Q?Conxita_Mar=EDn?= <comarin@telefonica.net> writes:
> Is this a bug?

Not if Oct 26 is a daylight savings transition day where you live.

There's been discussion of whether type interval should represent
'1 day' differently from '24 hours'.  The current behavior is surely
correct for an interval of '24 hours', but arguably it's not what you
want if you say '1 day'.  No one's got round to making it happen though.

In the meantime, I suspect what you are really looking for is the
date-plus-integer operation, not the date-plus-interval operation.
The latter promotes the date to a timestamp, which doesn't seem to
be what you would like.

            regards, tom lane

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

Предыдущее
От: Erik Price
Дата:
Сообщение: Re: PRIMARY KEYS
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: SELECT DISTINCT ON bug?