psql tab completion enhancements

From: Joachim Wieland <joe(at)mcknight(dot)de>
To: pgsql-patches(at)postgresql(dot)org
Subject: psql tab completion enhancements
Date: 2006-01-06 19:27:39
Message-ID: 20060106192739.GA5900@mcknight.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

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 Content-Type Size
pg_tabcomplete_lists.diff text/plain 7.1 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2006-01-06 20:31:46 Re: [HACKERS] Inconsistent syntax in GRANT
Previous Message Marko Kreen 2006-01-06 19:06:09 Re: [HACKERS] Inconsistent syntax in GRANT