Re: [COMMITTERS] pgsql: Centralize definition of integer limits.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [COMMITTERS] pgsql: Centralize definition of integer limits.
Дата
Msg-id 19400.1427818248@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [COMMITTERS] pgsql: Centralize definition of integer limits.  (Andres Freund <andres@anarazel.de>)
Ответы Re: [COMMITTERS] pgsql: Centralize definition of integer limits.  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2015-03-30 21:50:09 +0200, Andres Freund wrote:
>> I'm too fried from the redeye back from pgconf nyc to do anything
>> complicated, but it seems quite possible to define int64/uint64 based
>> the stdint.h types if available. And generally a good idea too. I guess
>> I'll try that tomorrow; unless Andrew beats me to it.

> It's possible to do that, but it's not as trivial as I'd hoped. For one
> we'd need to include stdint.h in some places we don't today
> (postgres_ext.h), for another we'd need some uglyness to determine the
> correct printf modifier for int64_t (can't use PRId64 etc afaics).

Yeah, I thought the printf strings would be the sticking point :-(

> I'm tempted to just prefix our limits with PG_ and define them
> unconditionally, including appropriate casts to our types.

I don't have a better idea.
        regards, tom lane



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: double vacuum in initdb
Следующее
От: Andres Freund
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Centralize definition of integer limits.