pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: psql: Improve tab completion for COPY command.
Date: Mon, 30 Jun 2025 09:36:57 +0000
Message-ID: <E1uWAwb-0041F2-0W@gemulon.postgresql.org> (raw)

psql: Improve tab completion for COPY command.

Previously, tab completion for COPY only suggested plain tables
and partitioned tables, even though materialized views are also
valid for COPY TO (since commit 534874fac0b), and foreign tables
are valid for COPY FROM.

This commit enhances tab completion for COPY to also include
materialized views and foreign tables.

Views with INSTEAD OF INSERT triggers are supported with
COPY FROM but rarely used, so plain views are intentionally
excluded from completion.

Author: jian he <jian.universality@gmail.com>
Co-authored-by: Fujii Masao <masao.fujii@gmail.com>
Reviewed-by: Kirill Reshke <reshkekirill@gmail.com>
Reviewed-by: David G. Johnston <david.g.johnston@gmail.com>
Discussion: https://postgr.es/m/CACJufxFxnSkikp+GormAGHcMTX1YH2HRXW1+3dJM9w7yY9hdsg@mail.gmail.com

Branch
------
master

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

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



view thread (3+ messages)  latest in thread

Message-ID: <E1uWAwb-0041F2-0W@gemulon.postgresql.org>
Permalink:  ../E1uWAwb-0041F2-0W@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1uWAwb-0041F2-0W@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: fujii@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: psql: Improve tab completion for COPY command.
  In-Reply-To: <E1uWAwb-0041F2-0W@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox