Re: USECS_* constants undefined with float8 timestamps?

Поиск
Список
Период
Сортировка
От Johann 'Myrkraverk' Oskarsson
Тема Re: USECS_* constants undefined with float8 timestamps?
Дата
Msg-id x6zkje9tts.fsf@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: USECS_* constants undefined with float8 timestamps?  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: USECS_* constants undefined with float8 timestamps?  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:

> Robert Haas wrote:
>> On Fri, Jul 29, 2011 at 11:18 AM, Johann 'Myrkraverk' Oskarsson
>> <johann@2ndquadrant.com> wrote:
>> >
>> > I just noticed that the USECS_* constants are not defined when
>> > the server is compiled without integer dates and timestamps.
[snip]
>> I don't see any particular reason not define them unconditionally.
>
> Well, they are only used by integer dates, so why expand their
> visibility?  The define does make it clear how they are used.  I
> suppose if someone wanted to use them outside that case, we could
> open them up. It is true that with integer dates now the default, we
> might find that someone introduces compile problems by using them
> outside the integer dates scope.

I found a use for them in PL/Java which detects at run-time whether
the server is using floating point or integer dates.  The simplest way
was just to use magic numbers instead on the off chance it's compiled
with a server using float dates.


--   Johann Oskarsson                http://www.2ndquadrant.com/    |[]  PostgreSQL Development, 24x7 Support, Training
andServices  --+--                                                                 |  Blog:
http://my.opera.com/myrkraverk/blog/



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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: index-only scans
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Inserting heap tuples in bulk in COPY