Re: psql - missing tab-completion support for tablespaces

From: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: psql - missing tab-completion support for tablespaces
Date: 2004-08-10 08:41:04
Message-ID: 41188A20.50308@kaltenbrunner.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Bruce Momjian wrote:
> Stefan Kaltenbrunner wrote:
>
>>When looking through the code I found that there seem to be much more
>>places where the tabcomplete-code is not 100% in sync with what the
>>doc's show as possible syntax.
>>Is there interest in fixing those up (ie qualifing as BUGS that can get
>>fixed during BETA) ? If so I could take a look at those in the next days ...
>
>
> Yes, please send in any tab completion improvements you can make.

Hi!

attached is a patch that adds/fixes several smaller things in the
psql-tabcomplete code. This diff inculdes the TABLESPACE tab-complete
patches I sent earlier.
Since we are in Beta now and I'm by no means a programmer, I want to
know if this is something that is needed - or if I'm completely off-way
with what I'm doing here and wasting your and my time ...

below is a list of the things I have changed with this patch.

*) add tablespace support for CREATE/DROP/ALTER and \db
*) sync the list of possible commands following ALTER with the docs (by
adding
AGGREGATE,CONVERSATION,DOMAIN,FUNCTION,LANGUAGE,OPERATOR,SEQUENCE,TABLESPACE
and TYPE)
*) provide a list of valid users in every occurence of "OWNER TO"
*) tab-complete support for ALTER (AGGREGATE|CONVERSION|FUNCTION)
*) basic tab-complete support for ALTER DOMAIN
*) provide a list of suitable indexes following ALTER TABLE <sth>
CLUSTER ON(?)
*) add "CLUSTER ON" and "SET" to the ALTER TABLE <sth> - tab-complete
list(fixes incorrect/wrong tab-complete with ALTER TABLE <sth> SET
+<TAB> too)
*) provide a list of possible indexes following ALTER TABLE <sth> CLUSTER ON
*) provide list of possible commands(WITHOUT CLUSTER,WITHOUT OIDS,
TABLESPACE) following ALTER TABLE <sth> SET
*) sync "COMMENT ON" with docs by adding "CAST","CONVERSION","FUNCTION"
*) add ABSOLUT to the list of possible commands after FETCH
*) "END" was missing from the sql-commands overview (though it had
completion support!) - i know it's depreciated but we have ABORT and
others still in ...
*) fixes small buglet with ALTER (TRIGGER|CLUSTER) ON autocomplete
(CLUSTER ON +<TAB> would produce CLUSTER ON ON - same for TRIGGER ON)

and some random things I noticed that are either still missing or need
some thought:

*) provide a list of conversions after ALTER CONVERSION (?)
*) tabcomplete-support for ALTER SEQUENCE
*) add RENAME TO to ALTER TRIGGER
*) add OWNER TO to ALTER TYPE
*) tab-completesupport for ALTER USER
*) fix ALTER (GROUP|DOMAIN|...) <sth> DROP - autocomplete
*) RENAME TO support for ALTER LANGUAGE <sth>
*) more complete support for COPY
*) more complete ALTER TABLE - support

Stefan

Attachment Content-Type Size
tabcomplete.diff text/plain 11.1 KB

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Aleksander Kmetec 2004-08-10 09:11:16 Re: Win32 PostgreSQL 8.0 Beta 1 Installer available
Previous Message Johan Paul Glutting 2004-08-10 08:24:55 Re: Win32 PostgreSQL 8.0 Beta 1 Installer available