Hi Tom,
> This patch will cause psql's \d to fail hard against any pre-v19
> server. That's not acceptable. Note the comment at the top of
> describe.c:
>
> * Support for the various \d ("describe") commands. Note that the current
> * expectation is that all functions in this file will succ
Philip Alger writes:
> I am attaching v3.
This patch will cause psql's \d to fail hard against any pre-v19
server. That's not acceptable. Note the comment at the top of
describe.c:
* Support for the various \d ("describe") commands. Note that the current
* expectation is that all functions
I am attaching v3.
I changed the name of the function that prints out the trigger using the \d
command (below) from `pg_get_triggerdef_compact` to
`pg_get_triggerdef_string`, which matches the index naming convention for a
similar function.
postgres=# \d child3
>Table "public.chil
Hi Chao,
> > I think this is a mis-use of PRETTYFLAG_SCHEMA that is for printing
> schema-qualified names but omitting schema.
> >
> > Yes, this is to omit the schema because the functions is used to print
> out the triggers when using \d in psql, The current practice isn't to print
> out a schem
> On Nov 5, 2025, at 04:56, Philip Alger wrote:
>
> Hi Chao,
>
> +/*
> + * pg_get_triggerdef_compact
> + * Returns trigger definition in a compact, single-line format
> without
> + * schema qualification designed for the psql \d command.
> + */
> +Datum
> +pg_get_trig
Hi Chao,
+/*
> + * pg_get_triggerdef_compact
> + * Returns trigger definition in a compact, single-line
> format without
> + * schema qualification designed for the psql \d command.
> + */
> +Datum
> +pg_get_triggerdef_compact(PG_FUNCTION_ARGS)
> +{
> + Oid
> On Nov 4, 2025, at 11:36, Philip Alger wrote:
>
> --
> Best,
> Phil Alger
>
1
```
+/*
+ * pg_get_triggerdef_compact
+ * Returns trigger definition in a compact, single-line format
without
+ * schema qualification designed for the psql \d command.
+ */
+Datum
+pg_
PATCH] Add pretty formatting to pg_get_triggerdef
Hello Hackers,
Currently, `pg_get_triggerdef` includes a "pretty" flag, but it does not
actually format the `CREATE TRIGGER` statement in a "pretty" way. Unlike
`pg_get_viewdef`, `pg_get_ruledef`, and `pg_get_indexdef`, the pur
Hello Hackers,
Currently, `pg_get_triggerdef` includes a "pretty" flag, but it does not
actually format the `CREATE TRIGGER` statement in a "pretty" way. Unlike
`pg_get_viewdef`, `pg_get_ruledef`, and `pg_get_indexdef`, the purpose of
pretty formatting has been to remove the schema name so it can