pgsql: Rework tab completion of COPY and \copy in psql - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: Rework tab completion of COPY and \copy in psql
Date
Msg-id E1jxiqS-0005vO-Fm@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Rework tab completion of COPY and \copy in psql

This corrects and simplifies $subject in a number of ways:
- Remove from the completion the pre-9.0 grammar still supported for
compatibility purposes.  This simplifies the code, and allows to extend
it more easily with new patterns.
- Add completion for the options of FORMAT within a WITH clause.
- Complete WHERE and WITH clauses correctly depending on if TO or FROM
are used, WHERE being only available with COPY FROM.

Author: Vignesh C, Michael Paquier
Reviewed-by: Ahsan Hadi
Discussion: https://postgr.es/m/CALDaNm3zWr=OmxeNqOqfT=uZTSdam_j-gkX94CL8eTNfgUtf6A@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c273d9d8ce412a475082b1729462845d2abb5ae8

Modified Files
--------------
src/bin/psql/tab-complete.c | 48 +++++++++++++++++++++++++--------------------
1 file changed, 27 insertions(+), 21 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Fix some corner cases for window ranges with infinite offsets.
Next
From: Tom Lane
Date:
Subject: pgsql: Avoid direct C access to possibly-null pg_subscription_rel.srsub