In my psql script all foreign key references include the clause on delete cascade on update cascade, because the default is on delete no action on update no action:
create table x (
y bigint
references schema1.table1(column1)
ON DELETE CASCADE
ON UPDATE CASCADE
);
This construct is repeated hundreds of times.
So I would rather like to write:
create table x (
y bigint
references schema1.table1(column1)
);
How to change the default in Postgres temporarily?
information_schemathat dynamically constructs and executes an adequatealter table..alter columnon all non-system objects using a given setting, default or otherwise.