Re: Improper use about DatumGetInt32

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Improper use about DatumGetInt32
Дата
Msg-id 20200921195311.3uq32ddfy5r5gpbg@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Improper use about DatumGetInt32  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Improper use about DatumGetInt32
Список pgsql-hackers
Hi,

On 2020-09-21 14:08:22 -0400, Robert Haas wrote:
> There is no SQL type corresponding to the C data type uint32, so I'm
> not sure why we even have DatumGetUInt32.  I'm sort of suspicious that
> there's some fuzzy thinking going on there.

I think we mostly use it for the few places where we currently expose
data as a signed integer on the SQL level, but internally actually treat
it as a unsigned data. There's not a lot of those, but there e.g. is
pg_class.relpages.  There also may be places where we use it for
functions that can be created but not called from SQL (using the
INTERNAL type).

- Andres



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: pgindent vs dtrace on macos
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: WIP: BRIN multi-range indexes