pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: Gilles Darold <gilles.darold@dalibo.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [patch] psql tab completion for ALTER DEFAULT PRIVILEGES
Date: Thu, 22 Dec 2016 17:26:22 -0500
Message-ID: <20161222222622.GU18360@tamriel.snowman.net> (raw)
In-Reply-To: <9905474c-ab29-bb66-408f-ca776fb3d69c@dalibo.com>
References: <1614593c-e356-5b27-6dba-66320a9bc68b@dalibo.com>
	<9905474c-ab29-bb66-408f-ca776fb3d69c@dalibo.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Gilles,

* Gilles Darold (gilles.darold@dalibo.com) wrote:
> Le 20/11/2016 à 15:46, Gilles Darold a écrit :
> > When tab-completing after ALTER DEFAULT PRIVILEGES ... GRANT|REVOKE,
> > currently psql injects completion from the GRANT|REVOKE order, rather
> > than the one expected.
> >
> > A patch is attached. It adds the right completion to GRANT|REVOKE after
> > ALTER DEFAULT PRIVILEGES and after FOR ROLE|USER + IN SCHEMA.
> 
> Added to next commitfest. To explain more this patch, the completion of
> SQL command:

I've started looking at this.  First off, it looks pretty good and seems
like it's actually a bug fix which should be back-patched since the
current behavior in released branches is also wrong.  There's been some
changes in this area, so it might not be practical to go all the way
back, will have to see once I start getting into it.

One minor nit is that multi-line comments should be of the form:

/*
 * ...
 */

The tab-completion code does do some like this:

/* ... */
    /* ... */

Which is probably alright, but you've add some like:

/* ...
      .... */

Which we really don't do.  I'll clean that up and might do a bit of
word-smithing on the comments also, so no need for a new patch, but
thought I'd mention it for future patches.

Thanks!

Stephen

Attachments:

  signature.asc (application/pgp-signature, 818B) download

view thread (5+ messages)  latest in thread

Message-ID: <20161222222622.GU18360@tamriel.snowman.net>
Permalink:  ../20161222222622.GU18360@tamriel.snowman.net/
Also on:    postgresql.org/message-id/20161222222622.GU18360@tamriel.snowman.net

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: sfrost@snowman.net, gilles.darold@dalibo.com
  Subject: Re: [patch] psql tab completion for ALTER DEFAULT PRIVILEGES
  In-Reply-To: <20161222222622.GU18360@tamriel.snowman.net>

* 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