allow_system_table_mods

A configuration parameter determining whether system tables can be modified

allow_system_table_mods is a configuration parameter determining whether system catalogue tables can be modified.

allow_system_table_mods was added in PostgreSQL 8.2.

IMPORTANT: use of this setting can cause irreparable damage to the database.

Default value

The default value for allow_system_table_mods is: false.

Change history

Examples

Misusing allow_system_table_mods to (among others) disable metadata lookups:

postgres=# SHOW allow_system_table_mods;
 allow_system_table_mods 
-------------------------
 on
(1 row)

postgres=# UPDATE pg_class SET relname='pg_foo' WHERE relname='pg_class';
UPDATE 1

postgres=# \dt
ERROR:  relation "pg_catalog.pg_class" does not exist
LINE 5: FROM pg_catalog.pg_class c
             ^

Categories

Dangerous thing, GUC configuration item, System catalogue