Re: [patch] psql tab completion for ALTER DEFAULT PRIVILEGES

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Gilles Darold <gilles(dot)darold(at)dalibo(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [patch] psql tab completion for ALTER DEFAULT PRIVILEGES
Date: 2016-12-22 22:26:22
Message-ID: 20161222222622.GU18360@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gilles,

* Gilles Darold (gilles(dot)darold(at)dalibo(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-12-22 22:30:03 Re: pg_background contrib module proposal
Previous Message Alvaro Herrera 2016-12-22 22:18:00 Re: Indirect indexes