Re: [HACKERS] Macros bundling RELKIND_* conditions
От | Joe Conway |
---|---|
Тема | Re: [HACKERS] Macros bundling RELKIND_* conditions |
Дата | |
Msg-id | 44e72329-de12-f1e3-550e-b821af249020@joeconway.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] Macros bundling RELKIND_* conditions (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>) |
Ответы |
Re: [HACKERS] Macros bundling RELKIND_* conditions
|
Список | pgsql-hackers |
On 08/02/2017 10:52 PM, Ashutosh Bapat wrote: > On Wed, Aug 2, 2017 at 11:15 PM, Alvaro Herrera > <alvherre@2ndquadrant.com> wrote: >> Alvaro Herrera wrote: >>> I think pg_class is a reasonable place to put more generic relkind lists >>> alongside a matching error message for each, rather than specialized >>> "does this relkind have storage" macros. What about something like a >>> struct list in pg_class.h, >> >> I just noticed that this doesn't help at all with the initial problem >> statement, which is that some of the relkind checks failed to notice >> that partitioned tables needed to be added to the set. Maybe it still >> helps because you have something to grep for, as Tom proposed elsewhere. > > Having something like relkind_i_t_T, though correct, doesn't make the > test readable. That's another improvement because of using such > macros. The macro name tells the purpose of the test, which is what a > reader would be interested in, rather than the actual values used. +1 Joe -- Crunchy Data - http://crunchydata.com PostgreSQL Support for Secure Enterprises Consulting, Training, & Open Source Development
В списке pgsql-hackers по дате отправления: