| From: | Jim Jones <jim(dot)jones(at)uni-muenster(dot)de> |
|---|---|
| To: | Philip Alger <paalger0(at)gmail(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com> |
| Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, Cary Huang <cary(dot)huang(at)highgo(dot)ca>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement |
| Date: | 2025-10-25 18:48:34 |
| Message-ID: | 3f90523d-270c-4296-98cf-7196d2ee456e@uni-muenster.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Phil, Hi Jian
On 23/10/2025 00:27, Philip Alger wrote:
> It might be advantageous to show a `trigger name cannot be schema
> qualified` error to the user. Therefore, I added the check and the tests
> on v8 attached.
>
> postgres=# SELECT pg_get_trigger_ddl('main_table', 'public.modified_a');
> ERROR: trigger name cannot be schema qualified
I'm not sure this is the way to go here. Why specifically check for a
schema qualified trigger if it cannot be created in the first place? The
current error message for "trigger not found" would IMHO suffice, e.g.
ERROR: trigger "s.tr" for table "t" does not exist
Jian, is that what you had in mind?
Best, Jim
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Sergey Prokhorenko | 2025-10-25 19:15:48 | Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions |
| Previous Message | Andrey Borodin | 2025-10-25 18:07:10 | Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions |