]> git.ipfire.org Git - thirdparty/postgresql.git/commit
psql \dX: check schema when listing statistics objects
authorTomas Vondra <tomas.vondra@postgresql.org>
Mon, 26 Jul 2021 15:12:28 +0000 (17:12 +0200)
committerTomas Vondra <tomas.vondra@postgresql.org>
Mon, 26 Jul 2021 15:31:16 +0000 (17:31 +0200)
commit611e42444b121370f561d860552beb7d28dacbf8
treed04c6f6c18b83a2079fec971fa1ddc87489d5b63
parentf2a37ddbb10177fd731109df4a63d10150a91c0d
psql \dX: check schema when listing statistics objects

Commit ad600bba04 added psql command \dX listing extended statistics
objects, but it failed to consider search_path when selecting the
elements so some of the returned elements might be invisible.

The visibility was already considered for tab completion (added by
commit d99d58cdc8), so adding it to the query is fairly simple.

Reported and fix by Justin Pryzby, regression tests by me. Backpatch
to PostgreSQL 14, where \dX was introduced.

Batchpatch-through: 14
Author: Justin Pryzby
Reviewed-by: Tatsuro Yamada
Discussion: https://postgr.es/m/c027a541-5856-75a5-0868-341301e1624b%40nttcom.co.jp_1
src/bin/psql/describe.c
src/test/regress/expected/stats_ext.out
src/test/regress/sql/stats_ext.sql