v3-0002-Use-d-alias-for-pg_description-consistently.patch
text/x-patch
Filename: v3-0002-Use-d-alias-for-pg_description-consistently.patch
Type: text/x-patch
Part: 1
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: format-patch
Series: patch v3-0002
Subject: Use d alias for pg_description consistently
| File | + | − |
|---|---|---|
| src/bin/psql/describe.c | 3 | 3 |
From 8f047924e0d5e7fbf4ad7064b5be1b9fe3b53078 Mon Sep 17 00:00:00 2001
From: Jelte Fennema-Nio <github-tech@jeltef.nl>
Date: Sun, 23 Feb 2025 15:41:48 +0100
Subject: [PATCH v3 2/2] Use d alias for pg_description consistently
In the psql query for \dx we used "c" as an alias for pg_description.
That's a pretty arbitrary letter and given that in all other queries in
use "d" as alias for that table this changes that to follow that
convention.
Reported-By: Michael Banck
---
src/bin/psql/describe.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index 01e62430fff..bf565afcc4e 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -6189,12 +6189,12 @@ listExtensions(const char *pattern)
printfPQExpBuffer(&buf,
"SELECT e.extname AS \"%s\", "
"e.extversion AS \"%s\", ae.default_version AS \"%s\","
- "n.nspname AS \"%s\", c.description AS \"%s\"\n"
+ "n.nspname AS \"%s\", d.description AS \"%s\"\n"
"FROM pg_catalog.pg_extension e "
"LEFT JOIN pg_catalog.pg_namespace n ON n.oid = e.extnamespace "
- "LEFT JOIN pg_catalog.pg_description c ON c.objoid = e.oid "
+ "LEFT JOIN pg_catalog.pg_description d ON d.objoid = e.oid "
"LEFT JOIN pg_catalog.pg_available_extensions() ae(name, default_version, comment) ON ae.name = e.extname "
- "AND c.classoid = 'pg_catalog.pg_extension'::pg_catalog.regclass\n",
+ "AND d.classoid = 'pg_catalog.pg_extension'::pg_catalog.regclass\n",
gettext_noop("Name"),
gettext_noop("Version"),
gettext_noop("Default version"),
--
2.43.0