2018-08-14 Greg Clough

Simulating ON COMMIT DELETE Global Temporary Tables on PostgreSQL

Vibhor Kumar did a great post on Leveraging Local Temporary Table for Global Temporary Table in EDB Postgres 9.6. The code example only covers the INSERT case, so here is an extension on that code which includes INSERT/UPDATE/DELETE: CREATE UNLOGGED TABLE gtt_test_definition (id int); CREATE VIEW gtt_test AS SELECT * FROM gtt_test_definition; CREATE OR REPLACE […]