Re: [HACKERS] [COMMITTERS] pgsql: Fix hard-coded relkind constants in pg_dump.c.

2017-03-09 Thread Michael Paquier
On Fri, Mar 10, 2017 at 10:59 AM, Tom Lane wrote: > Michael Paquier writes: >> On Fri, Mar 10, 2017 at 9:19 AM, Tom Lane wrote: >>> Existing style is mostly to inject relkind values into constructed >>> query strings using %c. I did not bother to touch places that did it >>> like that, but real

Re: [HACKERS] [COMMITTERS] pgsql: Fix hard-coded relkind constants in pg_dump.c.

2017-03-09 Thread Tom Lane
Michael Paquier writes: > On Fri, Mar 10, 2017 at 9:19 AM, Tom Lane wrote: >> Existing style is mostly to inject relkind values into constructed >> query strings using %c. I did not bother to touch places that did it >> like that, but really a better technique is to stringify the RELKIND >> macr

Re: [HACKERS] [COMMITTERS] pgsql: Fix hard-coded relkind constants in pg_dump.c.

2017-03-09 Thread Michael Paquier
On Fri, Mar 10, 2017 at 9:19 AM, Tom Lane wrote: > Fix hard-coded relkind constants in pg_dump.c. > > Although it's reasonable to expect that most of these constants will > never change, that does not make it good programming style to hard-code > the value rather than using the RELKIND_FOO macros.