Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement
Philip Alger <paalger0@gmail.com>
From: Philip Alger <paalger0@gmail.com>
To: jian he <jian.universality@gmail.com>
Cc: Jim Jones <jim.jones@uni-muenster.de>,
Andrew Dunstan <andrew@dunslane.net>, Cary Huang <cary.huang@highgo.ca>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-10-22T17:14:48Z
Lists: pgsql-hackers
Hi Jian,
> doc said trigger name can not be schema-qualified,
> we can not do:
> CREATE TRIGGER public.modified_a BEFORE UPDATE OF a ON main_table
> FOR EACH ROW WHEN (OLD.a <> NEW.a) EXECUTE PROCEDURE
> trigger_func('modified_a');
That's correct. The function wouldn't produce that output though.
+ nameList = textToQualifiedNameList(trgName);
> + DeconstructQualifiedName(nameList, &schemaName, &objName);
>
> So the above ``textToQualifiedNameList(trgName);`` part is wrong?
>
I am handling quoted trigger names. Is that wrong?
--
Best,
Phil Alger