pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #18731: The psql \d command does not exactly match but can be executed
3+ messages / 3 participants
[nested] [flat]
* BUG #18731: The psql \d command does not exactly match but can be executed
@ 2024-12-03 09:49 PG Bug reporting form <noreply@postgresql.org>
0 siblings, 1 reply; 3+ messages in thread
From: PG Bug reporting form @ 2024-12-03 09:49 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: zengman@halodbtech.com
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #18731: The psql \d command does not exactly match but can be executed
@ 2024-12-03 17:02 Tom Lane <tgl@sss.pgh.pa.us>
parent: PG Bug reporting form <noreply@postgresql.org>
0 siblings, 1 reply; 3+ messages in thread
From: Tom Lane @ 2024-12-03 17:02 UTC (permalink / raw)
To: zengman@halodbtech.com; +Cc: pgsql-bugs@lists.postgresql.org
PG Bug reporting form <noreply@postgresql.org> writes:
> I accidentally found that the \d command in psql does not match exactly, but
> it can be executed. Just like the demo below.
Yeah, this is true for the entire \d family: trailing garbage in the
command name doesn't really matter. I'm not excited about trying
to tighten that up; we'd likely get more complaints than kudos.
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #18731: The psql \d command does not exactly match but can be executed
@ 2024-12-04 02:50 zengman <zengman@halodbtech.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 3+ messages in thread
From: zengman @ 2024-12-04 02:50 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs <pgsql-bugs@lists.postgresql.org>
Yeah, this is true for the entire \d family: trailing garbage in the
command name doesn't really matter. I'm not excited about trying
to tighten that up; we'd likely get more complaints than kudos.
Ok, when I saw this problem, I also suspected that it was the original design,
thank you for your reply.
Thanks,
Man Zeng
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2024-12-04 02:50 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-12-03 09:49 BUG #18731: The psql \d command does not exactly match but can be executed PG Bug reporting form <noreply@postgresql.org>
2024-12-03 17:02 ` Tom Lane <tgl@sss.pgh.pa.us>
2024-12-04 02:50 ` zengman <zengman@halodbtech.com>
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