Re: [patch] psql tab completion for grant execute

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Daniel Verite <daniel(at)manitou-mail(dot)org>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [patch] psql tab completion for grant execute
Date: 2015-08-18 17:04:27
Message-ID: CA+TgmoZKq4KFAtOR2LJv0jXXOUuVOY7hRTS1V3ttfn3AsX55+w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Aug 17, 2015 at 5:07 PM, Daniel Verite <daniel(at)manitou-mail(dot)org> wrote:
> When tab-completing after GRANT EXECUTE, currently psql injects
> "PROCEDURE", rather than the expected "ON".
>
> The code for completing with "ON" is there, but it's not reached due to
> falling earlier into another branch, one that handles CREATE TRIGGER.
>
> A trivial patch is attached. It adds the condition that if EXECUTE is
> preceded by GRANT itself preceded by nothing, then that completion
> with PROCEDURE is skipped.

Thanks, I committed this. I don't think we usually back-patch tab
completion fixes, but I back-patched this one to 9.5 anyway, so that
it gets out into the wild a little sooner.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2015-08-18 17:24:54 Re: allowing wal_level change at run time
Previous Message Robert Haas 2015-08-18 17:01:29 Re: Proposal: Implement failover on libpq connect level.