PostgreSql propagate changes across databases -
i'm newbie databases , i'm facing seems simple problem. have , old database db_a contains table table_a , want use table in new database db_b. found out referential integrity across databases in postgresql not practice. solution copy table table_a db_b , use referential integrity.
so far good!
the problem is: want update new table in db_b changes in old table in db_a. 2 tables remain similar on time.
what best solution such classic issue?
the classic solution use multiple schemas (as in create schema...) instead of multiple databases. foreign key references, including on update cascade
, on delete cascade
work. can alter default privileges each schema if need to.
Comments
Post a Comment