Re: [patch] psql tab completion for grant execute

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Daniel Verite <daniel(at)manitou-mail(dot)org>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [patch] psql tab completion for grant execute
Date: 2015-08-18 00:21:23
Message-ID: CAB7nPqSD4ZGJ3J46RueKwcc4miH6GNOWq-3SntOMPxrPdoXd_A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 18, 2015 at 6:07 AM, Daniel Verite <daniel(at)manitou-mail(dot)org> wrote:
> Hi,
>
> 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.
>
> I've looked at fixing it more directly, by testing if the EXECUTE
> is part of a CREATE TRIGGER, but it didn't seem fitting to go
> looking backwards that many words into the string (more
> than the 5 words suggested by the rest of the code).

You should consider adding it to the next CF:
https://commitfest.postgresql.org/6/
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2015-08-18 03:46:23 Re: checkpointer continuous flushing
Previous Message Michael Paquier 2015-08-17 23:49:24 Re: replication slot restart_lsn initialization