pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Subject: Re: [COMMITTERS] pgsql: Fix hard-coded relkind constants in pg_dump.c.
Date: Thu, 09 Mar 2017 20:59:06 -0500
Message-ID: <7781.1489111146@sss.pgh.pa.us> (raw)
In-Reply-To: <CAB7nPqQBRksk+yZLWFSYBmU6ZfbK3B-6q+Z+Mkya+oBD=PLFvw@mail.gmail.com>
References: <E1cm8HR-0006He-5d@gemulon.postgresql.org>
	<CAB7nPqQBRksk+yZLWFSYBmU6ZfbK3B-6q+Z+Mkya+oBD=PLFvw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Michael Paquier <michael.paquier@gmail.com> writes:
> On Fri, Mar 10, 2017 at 9:19 AM, Tom Lane <tgl@sss.pgh.pa.us> 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
>> macro, at least in places where you'd want single quotes around the
>> code character.  That avoids any runtime effort and keeps the RELKIND
>> symbol close to where it's used.

> I have been wondering about the lack of readability with those
> hardcoded relkinds in the code for some time but... Wouldn't it be
> better to change as well psql's describe.c and tab_complete.c, as well
> as pg_upgrade and initdb code?

Yup, working on it.

There's a fair number of other fields that could stand the same treatment,
but for now I'm just going to touch references to relkind.

			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



view thread (7+ messages)  latest in thread

Message-ID: <7781.1489111146@sss.pgh.pa.us>
Permalink:  ../7781.1489111146@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/7781.1489111146@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, michael.paquier@gmail.com, pgsql-hackers@postgresql.org
  Subject: Re: [COMMITTERS] pgsql: Fix hard-coded relkind constants in pg_dump.c.
  In-Reply-To: <7781.1489111146@sss.pgh.pa.us>
  References: <E1cm8HR-0006He-5d@gemulon.postgresql.org> <CAB7nPqQBRksk+yZLWFSYBmU6ZfbK3B-6q+Z+Mkya+oBD=PLFvw@mail.gmail.com> <7781.1489111146@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox