Re: [PATCH] Add pretty formatting to pg_get_triggerdef - Mailing list pgsql-hackers

From Philip Alger
Subject Re: [PATCH] Add pretty formatting to pg_get_triggerdef
Date
Msg-id CAPXBC8+USgXBzYfA+M7LQGTrmED5UVWeTp2Ra69c4rqQeAV4bg@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Add pretty formatting to pg_get_triggerdef  (Philip Alger <paalger0@gmail.com>)
Responses Re: [PATCH] Add pretty formatting to pg_get_triggerdef
List 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
Attachment

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Spacing of options in getopt_long processing
Next
From: Arseniy Mukhin
Date:
Subject: Re: Optimize LISTEN/NOTIFY