Re: [HACKERS] Macros bundling RELKIND_* conditions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Macros bundling RELKIND_* conditions
Date
Msg-id 12916.1501693099@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Macros bundling RELKIND_* conditions  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [HACKERS] Macros bundling RELKIND_* conditions  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> I've thought about this kind of thing, too.  But the thing is that
> most of these macros you're proposing to introduce only get used in
> one place.

I think the value would be in having a centralized checklist of
things-to-fix-when-adding-a-new-relkind.  There's more than one way
to reach that goal, though.  I wonder whether the task should be defined
more like "grep for 'RELKIND_' and fix every place you find that".
If there are places to touch that fail to mention that string, fix
them, using comments if nothing else.  (But see fe797b4a6 and
followon commits for other solutions.)

> I think this might cause some problems for translators.

Yeah, the error messages that list a bunch of different relkinds in text
form are going to be a hassle no matter what.  Most of the ways you might
think of to change that will violate our translatability rules.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] Re: [BUGS] BUG #14758: Segfault with logicalreplication on a function index
Next
From: Robert Haas
Date:
Subject: Re: [HACKERS] pgbench: Skipping the creating primary keys after initialization