I have the following line in a CREATE TABLE statement:
field1_id bigint DEFAULT nextval(\'table1_field1_id_seq\'::regclass) NOT NULL,
What does
From what I understand of the documentation, oid are subdivided in types. regclass
are database objects representing relations (so that they belong to the metadata table pg_class).
It expresses a dependency between the sequence and the DEFAULT
expression (meaning the process of producing a default value if no explicit value is provided in a INSERT query for instance), so that if one emits a DROP SEQUENCE ...
on the sequence, the query won't pass, unless it's cascaded (by writing DROP SEQUENCE table1_field1_id_seq CASCADE
).