On Mon, Feb 6, 2023 at 1:28 PM Andres Freund <and...@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


Reply via email to