describe.uni.patch
text/x-patch
Filename: describe.uni.patch
Type: text/x-patch
Part: 0
Message:
Re: My first patch! (to \df output)
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 | + | − |
|---|---|---|
| doc/src/sgml/ref/psql-ref.sgml | 0 | 0 |
| src/bin/psql/describe.c | 0 | 0 |
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
new file mode 100644
index c41593c..0eb6b63
*** a/doc/src/sgml/ref/psql-ref.sgml
--- b/doc/src/sgml/ref/psql-ref.sgml
*************** testdb=>
*** 1188,1194 ****
class="parameter">pattern</replaceable> is specified, only
functions whose names match the pattern are shown. If the
form <literal>\df+</literal> is used, additional information
! about each function, including volatility, language, source
code and description, is shown. By default, only user-created
objects are shown; supply a pattern or the <literal>S</literal>
modifier to include system objects.
--- 1188,1194 ----
class="parameter">pattern</replaceable> is specified, only
functions whose names match the pattern are shown. If the
form <literal>\df+</literal> is used, additional information
! about each function, including security, volatility, language, source
code and description, is shown. By default, only user-created
objects are shown; supply a pattern or the <literal>S</literal>
modifier to include system objects.
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
new file mode 100644
index 15d02ee..3dadc09
*** a/src/bin/psql/describe.c
--- b/src/bin/psql/describe.c
*************** describeFunctions(const char *functypes,
*** 254,260 ****
" WHEN p.proiswindow THEN '%s'\n"
" WHEN p.prorettype = 'pg_catalog.trigger'::pg_catalog.regtype THEN '%s'\n"
" ELSE '%s'\n"
! "END as \"%s\"",
gettext_noop("Result data type"),
gettext_noop("Argument data types"),
/* translator: "agg" is short for "aggregate" */
--- 254,260 ----
" WHEN p.proiswindow THEN '%s'\n"
" WHEN p.prorettype = 'pg_catalog.trigger'::pg_catalog.regtype THEN '%s'\n"
" ELSE '%s'\n"
! " END as \"%s\"",
gettext_noop("Result data type"),
gettext_noop("Argument data types"),
/* translator: "agg" is short for "aggregate" */
*************** describeFunctions(const char *functypes,
*** 329,342 ****
if (verbose)
appendPQExpBuffer(&buf,
",\n CASE\n"
" WHEN p.provolatile = 'i' THEN '%s'\n"
" WHEN p.provolatile = 's' THEN '%s'\n"
" WHEN p.provolatile = 'v' THEN '%s'\n"
! "END as \"%s\""
",\n pg_catalog.pg_get_userbyid(p.proowner) as \"%s\",\n"
" l.lanname as \"%s\",\n"
" p.prosrc as \"%s\",\n"
" pg_catalog.obj_description(p.oid, 'pg_proc') as \"%s\"",
gettext_noop("immutable"),
gettext_noop("stable"),
gettext_noop("volatile"),
--- 329,349 ----
if (verbose)
appendPQExpBuffer(&buf,
",\n CASE\n"
+ " WHEN prosecdef THEN '%s'\n"
+ " ELSE '%s'\n"
+ " END AS \"%s\""
+ ",\n CASE\n"
" WHEN p.provolatile = 'i' THEN '%s'\n"
" WHEN p.provolatile = 's' THEN '%s'\n"
" WHEN p.provolatile = 'v' THEN '%s'\n"
! " END as \"%s\""
",\n pg_catalog.pg_get_userbyid(p.proowner) as \"%s\",\n"
" l.lanname as \"%s\",\n"
" p.prosrc as \"%s\",\n"
" pg_catalog.obj_description(p.oid, 'pg_proc') as \"%s\"",
+ gettext_noop("definer"),
+ gettext_noop("invoker"),
+ gettext_noop("Security"),
gettext_noop("immutable"),
gettext_noop("stable"),
gettext_noop("volatile"),