Peter Geoghegan <p...@heroku.com> writes:
> Are you proposing that we use the FLEXIBLE_ARRAY_MEMBER macro in every
> single place where we currently use the one element array pattern?

Yup, exactly.

> I count one place where we currently use FLEXIBLE_ARRAY_MEMBER. It'd be
> pretty ugly to have that everywhere, in my opinion.

Hm, I see 4 places in HEAD.  But in any case, is

    int16        values[1];        /* VARIABLE LENGTH ARRAY */
} int2vector;                      /* VARIABLE LENGTH STRUCT */

really better than

    int16        values[FLEXIBLE_ARRAY_MEMBER];
} int2vector;

?  I don't think so.  Relying on comments to tell about critical
semantics of a data structure isn't really nice if you can do it
in a way that is standards-blessed and (some) compilers understand.

                        regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to