Re: [PATCH] Add pretty formatting to pg_get_triggerdef

From: Philip Alger <paalger0(at)gmail(dot)com>
To: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Add pretty formatting to pg_get_triggerdef
Date: 2025-11-05 17:03:10
Message-ID: CAPXBC8+USgXBzYfA+M7LQGTrmED5UVWeTp2Ra69c4rqQeAV4bg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.child3"
> Column | Type | Collation | Nullable | Default
> --------+---------+-----------+----------+---------
> b | integer | | |
> a | text | | |
> Partition of: parent FOR VALUES IN ('CCC')
> Triggers:
> child3_delete_trig AFTER DELETE ON child3 REFERENCING OLD TABLE AS
> old_table FOR EACH STATEMENT EXECUTE FUNCTION dump_delete()
>
>
I've cleaned up the code by removing deparse_context variables related to
appendContextKeyword that were set as NULL or NIL. All tests passed.

--
Best,
Phil Alger
EDB: https://www.enterprisedb.com

Attachment Content-Type Size
v3-0001-Add-pretty-formatting-to-pg_get_triggerdef.patch application/octet-stream 20.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Arseniy Mukhin 2025-11-05 17:51:01 Re: Optimize LISTEN/NOTIFY
Previous Message Peter Eisentraut 2025-11-05 16:41:08 Re: Spacing of options in getopt_long processing