Re: undersized unions

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: undersized unions
Дата
Msg-id CA+TgmobwLf7BewSx=mb8+-VYiadvz2C4Xu4VDzCSyxwqP1Z9VQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: undersized unions  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Mon, Feb 6, 2023 at 1:28 PM Andres Freund <andres@anarazel.de> wrote:
> Perhaps something like

Yeah, that'd work. You'd want a big ol' warning comment here:

> typedef struct NumericData
> {
>         int32           vl_len_;                /* varlena header (do not touch directly!) */
>         NumericBase data;
> } NumericData;

like /* actually NumericShort or NumericLong */ or something

> Although I'd actually be tempted to rip out all the casts but NUMERIC_LONG()
> in this case, because it's all all just accessing the base n_header anyway.

Yeah.

-- 
Robert Haas
EDB: http://www.enterprisedb.com



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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: lockup in parallel hash join on dikkop (freebsd 14.0-current)
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Non-superuser subscription owners