Re: psql tab completion enhancements - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: psql tab completion enhancements
Date
Msg-id 200602031859.k13IxJY29867@candle.pha.pa.us
Whole thread Raw
In response to psql tab completion enhancements  (Joachim Wieland <joe@mcknight.de>)
Responses Re: psql tab completion enhancements  (Joachim Wieland <joe@mcknight.de>)
List pgsql-patches
I will adjust this patch based on later feedback emails.

Your patch has been added to the PostgreSQL unapplied patches list at:

    http://momjian.postgresql.org/cgi-bin/pgpatches

It will be applied as soon as one of the PostgreSQL committers reviews
and approves it.

---------------------------------------------------------------------------


Joachim Wieland wrote:
> Hi,
>
> psql's tab completion has the following problem:
>
> If we have the following syntax for example:
>
> SET SESSION AUTHORIZATION <user>;
> SET SESSION AUTHORIZATION DEFAULT;
>
> After "SET SESSION AUTHORIZATION", the tab completion can offer a list of
> roles or the string constant "DEFAULT". However it can't offer both because
> it can't get a list of roles and add a string constant to this list.
>
> The appended patch adds the functionality of lists that can be extended with
> constants.
>
> Then you get:
>
> template1=# SET session AUTHORIZATION <tab>
> DEFAULT  fred     joe      john
>
> I did proof-of-concept examples to add a constant to a
>
>  - list from a query
>  - list from a schema query
>  - list of table attributes
>
>
> Joachim
>

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [BUGS] BUG #2171: Differences compiling plpgsql in ecpg and psql
Next
From: Joachim Wieland
Date:
Subject: Re: psql tab completion enhancements