From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: zengman@halodbtech.com
Subject: BUG #18731: The psql \d command does not exactly match but can be executed
Date: Tue, 03 Dec 2024 09:49:44 +0000
Message-ID: <18731-1d54c3fe1171a9d5@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 18731
Logged by: Man Zeng
Email address: zengman@halodbtech.com
PostgreSQL version: 16.6
Operating system: centos-8
Description:
Hi everyone,
I accidentally found that the \d command in psql does not match exactly, but
it can be executed. Just like the demo below.
[postgres@iZuf6hwo0wgeev4dvua4csZ postgres]$ psql
psql (16.6)
Type "help" for help.
postgres=# \dxabcdef plpgsql
List of installed extensions
Name | Version | Schema | Description
---------+---------+------------+------------------------------
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
(1 row)
postgres=# \dx plpgsql
List of installed extensions
Name | Version | Schema | Description
---------+---------+------------+------------------------------
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
(1 row)
postgres=# \dxabcdef
List of installed extensions
Name | Version | Schema | Description
---------+---------+------------+------------------------------
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
(1 row)
Then I looked at the code, taking \dxabcdef as an example, psql only cares
about the previous \dx, so you can enhance the "exec_command_d" to match
normally.
But I don't want to introduce a lot of string matching here to solve this
problem, maybe there is a better idea.
At the same time I'm not sure if this is a known problem or a bug.
I look forward to your reply.
Thanks,
Man Zeng
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-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, zengman@halodbtech.com
Subject: Re: BUG #18731: The psql \d command does not exactly match but can be executed
In-Reply-To: <18731-1d54c3fe1171a9d5@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