pgsql: Improve tab completion of ALTER INDEX/TABLE with SET STATISTICS

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Improve tab completion of ALTER INDEX/TABLE with SET STATISTICS
Date: 2018-12-25 05:26:48
Message-ID: E1gbfEu-0003sl-2G@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Improve tab completion of ALTER INDEX/TABLE with SET STATISTICS in psql

This fixes two issues with the completion of ALTER TABLE and ALTER INDEX
after SET STATISTICS is typed, trying to suggest schema objects while
the grammar only allows integers.

The tab completion of ALTER INDEX is made smarter by handling properly
more patterns. COLUMN is an optional keyword, but as no column numbers
can be suggested yet as possible input simply adjust the completion so
as no incorrect queries are generated.

Author: Michael Paquier
Reviewed-by: Tatsuro Yamada
Discussion: https://postgr.es/m/20181219092255.GC680@paquier.xyz

Branch
------
master

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

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

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2018-12-26 20:30:58 pgsql: Fix portability failure introduced in commits d2b0b60e7 et al.
Previous Message Michael Paquier 2018-12-24 11:28:51 pgsql: Prioritize history files when archiving