Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement
| От | Jim Jones | 
|---|---|
| Тема | Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement | 
| Дата | |
| Msg-id | a44b18bf-c8ea-47d5-b951-857857c67c98@uni-muenster.de обсуждение исходный текст  | 
		
| Ответ на | Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement (jian he <jian.universality@gmail.com>) | 
| Ответы | 
                	
            		Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement
            		
            		 | 
		
| Список | pgsql-hackers | 
Hi Jian
On 28/10/2025 07:06, jian he wrote:
> SELECT pg_get_trigger_ddl('main_table', 'public.modified_a');
> should error out, I think.
> but V7 will not error out, instead it will ignore text "public" and print out
> DDL for the trigger name as "modified_a" which is not what I expected, so I
> raised the question.
> 
> The error message can be different, but it should error out.
+1
> I am fine with v8.
> ERROR:  trigger name cannot be schema qualified
> 
> I’m fine with changing it to the other error message:
> ERROR:  trigger name \"%s\" for table \"%s\" does not exist
I also think that raising an ERROR is the right approach here. My point
was rather the *extra check* for a schema qualified trigger name.
Letting it fail with the existing error message "trigger name \"%s\" for
table \"%s\" does not exist" down the road should be enough.
Best, Jim
		
	В списке pgsql-hackers по дате отправления: