isapir / Migrate2Postgres

Easily migrate from other DBMSs to PostgreSQL
GNU General Public License v3.0
52 stars 23 forks source link

Allow to run command(s) per connection at beginning and end #4

Open isapir opened 6 years ago

isapir commented 6 years ago

e.g. to disable the TRIGGERS before DML operations run:

SET session_replication_role = replica;

and then re-enable them at the end with:

SET session_replication_role = DEFAULT;
isapir commented 6 years ago

In the meantime added queries dml.execute.before_all and dml.execute.after_all in 86c30b3 which allows to disable triggers before copying and re-enable them afterwards