PostgreSQL: How to Disable or Enable Foreign Key Constraint of a Table

https://www.dbrnd.com/2017/02/postgresql-how-to-disable-or-enable-foreign-key-constraint-of-a-table-data-migration-bulk-operation/ ALTER TABLE table_name DISABLE TRIGGER ALL; INSERT INTO table_name VALUES (1,6,50,60,90); ALTER TABLE table_name ENABLE TRIGGER ALL;

UUID Primary Keys in PostgreSQL

http://www.starkandwayne.com/blog/uuid-primary-keys-in-postgresql/ https://dba.stackexchange.com/questions/146135/psql-9-5-gen-random-uuid-not-working psql 9.5: gen_random_uuid() not working? SELECT gen_random_uuid() produces output: ERROR: function gen_random_uuid() does not exist SQL state: 42883 Hint: No function matches the given name and argument types. You might need to add explicit type casts. you can check if the functions are defined using: select * from pg_proc where proname like ‘gen_random_%’; ...