Can we classify/say that TRUNCATE belongs to/falls under DML statement?
Check here for PostgreSQL TRUNCATE compatibility.
NOTE: TRUNCATE is part of SQL standard ANSI SQL 2008 – F200
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
PostgreSQL
I would say it’s a DML statement in PostgreSQL: PostgreSQL has a TRUNCATE trigger but PostgreSQL doesn’t have DDL triggers. So it can’t be a DDL statement.
It acquires an ACCESS EXCLUSIVE lock on each table it operates on and it’s not MVCC-safe but it’s transactionsafe and you can do a rollback.