Re: possible time change issue - known problem?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: possible time change issue - known problem?
Дата
Msg-id 28114.1049727026@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: possible time change issue - known problem?  ("Dan Langille" <dan@langille.org>)
Ответы Re: possible time change issue - known problem?  ("Dan Langille" <dan@langille.org>)
Список pgsql-general
"Dan Langille" <dan@langille.org> writes:
> On 7 Apr 2003 at 10:32, Tom Lane wrote:
>> Type INTERVAL knows about months and seconds, nothing else.

> Hmmm, months and seconds only.   Then is the documentation wrong?

No, the docs are right, but the physical storage is months and seconds.
For instance, '1 year' becomes '12 months' (okay) and '1 week' becomes
'604800 seconds' (not so okay).  Adding 'day' as a basic element would
allow correct handling of cross-DST-boundary cases.

>> I've opined in the past that it should be months, days, and seconds,
>> but no one seems excited enough about the issue to do the nontrivial
>> work involved ...

> If it truly is that trivial, please point me at the file I need to
> hack.

Didn't I just say that I think it's *not* trivial?  But anyway, the
interval-related functions are in some subset of

src/backend/utils/adt/date.c
src/backend/utils/adt/datetime.c
src/backend/utils/adt/nabstime.c
src/backend/utils/adt/timestamp.c
and see also their header files
src/include/utils/date.h
src/include/utils/datetime.h
src/include/utils/nabstime.h
src/include/utils/timestamp.h

There are several datatypes implemented in those files, but their
interconnections are spaghetti-ish enough that you'll probably have
to look through all the code before you start hacking.

            regards, tom lane


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

Предыдущее
От: "Dan Langille"
Дата:
Сообщение: Re: possible time change issue - known problem?
Следующее
От: Dennis Gearon
Дата:
Сообщение: Re: chron scripts and pgsql