Re: [HACKERS] [COMMITTERS] pgsql: Add missing support for new node fields - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: [HACKERS] [COMMITTERS] pgsql: Add missing support for new node fields
Date
Msg-id CAFj8pRDF-dwq4YhYdAzYd-s6hC4eHgDxcoSGFqSSmkki9BVWwg@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] [COMMITTERS] pgsql: Add missing support for new node fields  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers




IMHO, what would be a lot more useful than something that generates
{read,equal,copy,out}funcs.c automatically would be something that
just checks them for trivial errors of omission.  For example, if you
read a list of structure members from the appropriate header files and
cross-checked it against the list of structure members mentioned in
the body of a copy/equal/read/outfunc, you'd catch probably 80% of the
mistakes people make right there.  If you could also check for a
copy/read/equal/outfunc that ought to have been present but was
omitted entirely, that'd probably up it to 90%.


+1

The work on nodes maintenance is not too much, but some smart check can be nice.

Regards

Pavel
 
The idea would be that if you added a field that wasn't supposed to be
copied, you'd have to add something to copyfuncs.c that said, e.g.

/* NOTCOPIED: mymember */

...and the checking script would ignore things so flagged.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] identity columns
Next
From: Simon Riggs
Date:
Subject: Re: [HACKERS] Partitioned tables and relfilenode