Re: timestamp datatype cleanup

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: timestamp datatype cleanup
Дата
Msg-id 26606.1206058968@sss.pgh.pa.us
обсуждение исходный текст
Ответ на timestamp datatype cleanup  (Warren Turkal <turkal@google.com>)
Ответы Re: timestamp datatype cleanup  ("Warren Turkal" <turkal@google.com>)
Список pgsql-hackers
Warren Turkal <turkal@google.com> writes:
> Here's an initial bit of my attempt at cleaning up the the timestamp datatype.

I'm starting to work through this now.  Your two messages of 3/09 are
still the latest version correct?

> 2) Would it be reasonable to change timestamp.h into a file that
> includes other files that define the specific parts depending on
> HAVE_INT64_TIMESTAMP instead of testing for HAVE_INT64_TIMESTAMP many
> times throughout timestamp.h? I think this might more cleanly separate
> the logic for the different timestamp types.

I think this is probably a bad idea on maintainability grounds.  First,
you'd be duplicating the declarations that are the same, which would
leave you open to changing one copy and not the other.  Second, having
both versions of any given declaration adjacent to each other makes it
easier to compare them and keep them in sync.  Two separate files just
sounds like a recipe for code drift.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Integer datetimes
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] Add TimeOffset and DateOffset typedefs