jw=# CREATE TABLE base ( CHECK (tableoid = 'base'::regclass) );
CREATE TABLE
jw=# \d base
Table "public.base"
Column | Type | Modifiers
--------+------+-----------
Check constraints:
"base_tableoid_check" CHECK (tableoid = 'base'::regclass::oid)
jw=# INSERT INTO base DEFAULT VALUES ;
ERROR: new row for relation "base" violates check constraint
"base_tableoid_check"
jw=#