oid2name_tblspclocation.patch
text/x-patch
Filename: oid2name_tblspclocation.patch
Type: text/x-patch
Part: 1
Message:
Re: oid2name : add objects file path
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: unified
| File | + | − |
|---|---|---|
| contrib/oid2name/oid2name.c | 1 | 1 |
| doc/src/sgml/oid2name.sgml | 1 | 1 |
diff --git a/contrib/oid2name/oid2name.c b/contrib/oid2name/oid2name.c
index 51802907138..c7fdc3234b9 100644
--- a/contrib/oid2name/oid2name.c
+++ b/contrib/oid2name/oid2name.c
@@ -573,7 +573,7 @@ sql_exec_dumpalltbspc(PGconn *conn, struct options *opts)
char todo[1024];
snprintf(todo, sizeof(todo),
- "SELECT oid AS \"Oid\", spcname as \"Tablespace Name\"\n"
+ "SELECT oid AS \"Oid\", spcname as \"Tablespace Name\", pg_catalog.pg_tablespace_location(oid) AS \"Tablespace Location\"\n"
"FROM pg_catalog.pg_tablespace");
sql_exec(conn, todo, opts->quiet);
diff --git a/doc/src/sgml/oid2name.sgml b/doc/src/sgml/oid2name.sgml
index 54cc9be2b82..63704ee258c 100644
--- a/doc/src/sgml/oid2name.sgml
+++ b/doc/src/sgml/oid2name.sgml
@@ -86,7 +86,7 @@
<varlistentry>
<term><option>-s</option></term>
<term><option>--tablespaces</option></term>
- <listitem><para>show tablespace OIDs.</para></listitem>
+ <listitem><para>show tablespace OIDs and tablespaces paths.</para></listitem>
</varlistentry>
<varlistentry>