This extension disables the TRUNCATE statement by detecting the statement and raising ERROR.
The error code is ERRCODE_INVALID_SQL_StATEMENt_NAME
.
This extension requires PostgreSQL 13 or later.
TRUNCATE sample_table;
ERROR: non_truncate extension is banning TRUNCATE statement.
You can install this extension with the following command in this repository's top-level directory.
$ make
$ make install
This extension must be preloaded. Make sure that this extension is included in shared_preload_libraries in postgresql.conf.