View Revisions: Issue #6882

Summary 0006882: Capture TRUNCATE table events in PostgreSQL database
Revision 2025-05-09 18:18 by pbelov
Description The PostgreSQL database supports triggers for TRUNCATE table events.
Currently these events are not being captured by the existing DDL trigger feature.
Revision 2025-05-09 18:39 by pbelov
Description The PostgreSQL database supports triggers for TRUNCATE table events.
Currently these events are not being captured by the existing DDL trigger feature.

The TRUNCATE table event in PostgreSQL is:
* A table-level event (not a row-level or schema-level event).
* Must be implemented via a function or procedure.

Revision 2025-05-09 18:18 by pbelov
Steps To Reproduce
Revision 2025-05-09 18:39 by pbelov
Steps To Reproduce Set up a node with PostgreSQL database as a source.
Set the parameter
trigger.capture.ddl.changes=true

Create a test table :
   CREATE TABLE demo_small(id int);

Configure new SymmetricDS trigger for the demo_small table.

Execute truncate statement:
   TRUNCATE TABLE demo_small;

Observe: No new sym_data records.
Revision 2025-05-09 18:18 by pbelov
Additional Information
Revision 2025-05-09 18:39 by pbelov
Additional Information PostgreSQL docs:
Create Trigger https://www.postgresql.org/docs/17/sql-createtrigger.html
Trigger functions https://www.postgresql.org/docs/current/functions-event-triggers.html