DELETE FROM pg_class - Mailing list pgsql-general

From Dawid Kuroczko
Subject DELETE FROM pg_class
Date
Msg-id 758d5e7f0709240544j19471899k6996a816ed1aebff@mail.gmail.com
Whole thread Raw
Responses Re: DELETE FROM pg_class  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-general
Hello, I see that I can modify system tables even though I have
not set allow_system_table_mods...  Is this a feature or a bug?

Self contained code

postgres=# SELECT version();
                                                    version
---------------------------------------------------------------------------------------------------------------
 PostgreSQL 8.2.4 on i486-pc-linux-gnu, compiled by GCC cc (GCC) 4.1.3
20070718 (prerelease) (Debian 4.1.2-14)
(1 row)

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

postgres=# CREATE DATABASE foo;
CREATE DATABASE
postgres=# \c foo
You are now connected to database "foo".
foo=# DELETE FROM pg_class;
DELETE 204
foo=# SELECT count(*) FROM pg_class;
ERROR:  could not find pg_class tuple for index 2662
foo=# \c postgres
You are now connected to database "postgres".
postgres=# \c foo
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
Previous connection kept
postgres=#


   Regards,
     Dawid

pgsql-general by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: ERROR: must be superuser to alter superusers
Next
From: Niklas Johansson
Date:
Subject: Re: full join question...