>-----Original Message----- >From: Jaime Casanova [mailto:jaime.casan...@2ndquadrant.com] >Sent: Tuesday, July 3, 2018 11:06 AM
>Thinking on Michael's suggestion of using event triggers, you can create an >event >trigger to run pg_create_restore_point() on DROP, here's a simple >example of how >that should like: >https://www.postgresql.org/docs/current/static/functions-event-triggers.html >You can also create a normal trigger BEFORE TRUNCATE to create a restore point >just >before running the TRUNCATE command. Thanks for comments. I was able to understand. --- Naoki Yotsunaga