pgsql/src/bin/psql tab-complete.c

From: momjian(at)postgresql(dot)org (Bruce Momjian - CVS)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql/src/bin/psql tab-complete.c
Date: 2002-07-30 16:35:05
Message-ID: 20020730163505.E1816475BB9@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

CVSROOT: /cvsroot
Module name: pgsql
Changes by: momjian(at)postgresql(dot)org 02/07/30 12:35:05

Modified files:
src/bin/psql : tab-complete.c

Log message:
Added support for schemas and quotes in tab-complete.c, as well as
a few other things:

* Made all references to the pg_* tables absolute, by specifying
the pg_catalog schema.

* Added SCHEMA as a create/delete completion option.

* Added SCHEMA completion as: SELECT nspname FROM
pg_catalog.pg_namespace
WHERE substr(nspname,1,%d)='%s'

* Added completion of "INSERT INTO <table> (" with attribute names.

* Added completion of "INSERT INTO <table> (attribs)" with
VALUES or SELECT

* Added limited locking completion: only for one table:
"LOCK" and "LOCK TABLE" now both get a completion list of tables
Complete with "IN" for LOCK [TABLE] <table>
Complete LOCK [TABLE] <table> IN with a lock mode

* Added a very simple WHERE finisher that uses the previous word
as a table lookup for attributes.

* Added quote support when parsing "previous words". In other words,
hitting tab after INSERT INTO "foo bar baby"
now does the right thing and recognizes "foo bar baby" as one word.

Letting tab-complete quote things that should be quoted seems to be
temporarily ifdef'ed out due to readline compatibility problems.
Can anyone elaborate on this?

Greg Sabino Mullane

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian - CVS 2002-07-30 16:36:39 pgsql/contrib/ltree
Previous Message Bruce Momjian - CVS 2002-07-30 16:33:21 pgsql/src/backend/utils/adt ri_triggers.c