Re: Should TRUNCATE fire DDL triggers

2025-07-09 Thread David G. Johnston
On Wednesday, July 9, 2025, Hari Krishna Sunder wrote: > > I disagree here. There are regular ON TRUNCATE triggers on tables, so I > don't > > see the need. You can define a trigger with the same trigger function on > > several tables. > > You have to create a trigger for each table, and drop t

Re: Should TRUNCATE fire DDL triggers

2025-07-09 Thread Hari Krishna Sunder
> I disagree here. There are regular ON TRUNCATE triggers on tables, so I don't > see the need. You can define a trigger with the same trigger function on > several tables. You have to create a trigger for each table, and drop them before you drop the table. The DDL trigger will just work more s

Re: Should TRUNCATE fire DDL triggers

2025-07-08 Thread Laurenz Albe
On Tue, 2025-07-08 at 21:23 -0700, David G. Johnston wrote: > On Tuesday, July 8, 2025, Hari Krishna Sunder wrote: > > First of all, is TRUNCATE a DDL or a DML? This doc refers to it as a DDL, > > whereas other docs like this and this treat it as a DML, so which one is it? > > Neither…classificat

Re: Should TRUNCATE fire DDL triggers

2025-07-08 Thread David G. Johnston
On Tuesday, July 8, 2025, Hari Krishna Sunder wrote: > First of all, is TRUNCATE a DDL or a DML? This > doc refers to > it as a DDL, whereas other docs like this >

Should TRUNCATE fire DDL triggers

2025-07-08 Thread Hari Krishna Sunder
First of all, is TRUNCATE a DDL or a DML? This doc refers to it as a DDL, whereas other docs like this and this