v4-0002-Apply-Greg-s-comments.patch
text/x-patch
Filename: v4-0002-Apply-Greg-s-comments.patch
Type: text/x-patch
Part: 0
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 v4-0002
Subject: Apply Greg's comments
| File | + | − |
|---|---|---|
| doc/src/sgml/ref/psql-ref.sgml | 4 | 4 |
| src/bin/psql/describe.c | 9 | 10 |
| src/bin/psql/help.c | 1 | 1 |
From 29a59cb46665312810c9a73a6964afd3db0e03f6 Mon Sep 17 00:00:00 2001
From: Sadeq Dousti <3616518+msdousti@users.noreply.github.com>
Date: Wed, 26 Feb 2025 01:23:52 +0100
Subject: [PATCH v4 2/2] Apply Greg's comments
---
doc/src/sgml/ref/psql-ref.sgml | 8 ++++----
src/bin/psql/describe.c | 19 +++++++++----------
src/bin/psql/help.c | 2 +-
3 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index ea124e5a4d5..37b516fc558 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -1635,8 +1635,8 @@ SELECT $1 \parse stmt1
<varlistentry id="app-psql-meta-command-de">
<term><literal>\dE[Sx+] [ <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link> ]</literal></term>
<term><literal>\di[Sx+] [ <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link> ]</literal></term>
- <term><literal>\dN[Sx+] [ <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link> ]</literal></term>
<term><literal>\dm[Sx+] [ <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link> ]</literal></term>
+ <term><literal>\dN[Sx+] [ <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link> ]</literal></term>
<term><literal>\ds[Sx+] [ <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link> ]</literal></term>
<term><literal>\dt[Sx+] [ <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link> ]</literal></term>
<term><literal>\dv[Sx+] [ <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link> ]</literal></term>
@@ -1645,15 +1645,15 @@ SELECT $1 \parse stmt1
<para>
In this group of commands, the letters <literal>E</literal>,
<literal>i</literal>, <literal>m</literal>, <literal>N</literal>,
- , <literal>s</literal>, <literal>t</literal>, and <literal>v</literal>
+ <literal>s</literal>, <literal>t</literal>, and <literal>v</literal>
stand for foreign table, index, materialized view, no partitions,
sequence, table, and view,
respectively.
You can specify any or all of
these letters, in any order, to obtain a listing of objects
of these types. For example, <literal>\dti</literal> lists
- tables and indexes, and <literal>\dNti</literal> lists
- tables and indexes that are not partitions of any other relation.
+ tables and indexes, and <literal>\dNt</literal> lists
+ tables that are not partitions of any other relation.
If <literal>x</literal> is appended to the command name, the results
are displayed in expanded mode.
If <literal>+</literal> is
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index ba1d6c09bc9..d4be468de55 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -4024,7 +4024,6 @@ listTables(const char *tabtypes, const char *pattern, bool verbose, bool showSys
printQueryOpt myopt = pset.popt;
int cols_so_far;
bool translate_columns[] = {false, false, true, false, false, false, false, false, false};
- char *no_partition_description = showNoPartitions ? " non-partition" : "";
/*
* Note: Declarative table partitioning is only supported as of Pg 10.0.
@@ -4205,14 +4204,14 @@ listTables(const char *tabtypes, const char *pattern, bool verbose, bool showSys
if (pattern)
{
if (ntypes != 1)
- pg_log_error("Did not find any%s relations named \"%s\".",
- no_partition_description, pattern);
+ pg_log_error("Did not find any relations named \"%s\".",
+ pattern);
else if (showTables)
- pg_log_error("Did not find any%s tables named \"%s\".",
- no_partition_description, pattern);
+ pg_log_error("Did not find any tables named \"%s\".",
+ pattern);
else if (showIndexes)
- pg_log_error("Did not find any%s indexes named \"%s\".",
- no_partition_description, pattern);
+ pg_log_error("Did not find any indexes named \"%s\".",
+ pattern);
else if (showViews)
pg_log_error("Did not find any views named \"%s\".",
pattern);
@@ -4232,11 +4231,11 @@ listTables(const char *tabtypes, const char *pattern, bool verbose, bool showSys
else
{
if (ntypes != 1)
- pg_log_error("Did not find any%s relations.", no_partition_description);
+ pg_log_error("Did not find any relations.");
else if (showTables)
- pg_log_error("Did not find any%s tables.", no_partition_description);
+ pg_log_error("Did not find any tables.");
else if (showIndexes)
- pg_log_error("Did not find any%s indexes.", no_partition_description);
+ pg_log_error("Did not find any indexes.");
else if (showViews)
pg_log_error("Did not find any views.");
else if (showMatViews)
diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c
index 186699638c7..09f98da98f2 100644
--- a/src/bin/psql/help.c
+++ b/src/bin/psql/help.c
@@ -259,7 +259,7 @@ slashUsage(unsigned short int pager)
HELP0(" \\dL[Sx+] [PATTERN] list procedural languages\n");
HELP0(" \\dm[Sx+] [PATTERN] list materialized views\n");
HELP0(" \\dn[Sx+] [PATTERN] list schemas\n");
- HELP0(" \\dN[Sx+] [PATTERN] list relation, table, index (no partitions) \n");
+ HELP0(" \\dN[Sx+] [PATTERN] list tables and indexes (no partitions)\n");
HELP0(" \\do[Sx+] [OPPTRN [TYPEPTRN [TYPEPTRN]]]\n"
" list operators\n");
HELP0(" \\dO[Sx+] [PATTERN] list collations\n");
--
2.43.0