Use --load-extension to set up for contrib/tcn's isolation tests.
authorTom Lane <[email protected]>
Thu, 1 Sep 2022 18:30:41 +0000 (14:30 -0400)
committerTom Lane <[email protected]>
Thu, 1 Sep 2022 18:30:41 +0000 (14:30 -0400)
Oversight in commit 418ec3207: it's better to do it like this,
else you have to drop and recreate the extension for each
permutation.  tcn.spec only has one permutation at present,
so this doesn't speed it up any, but it's still a bad example.

contrib/tcn/Makefile
contrib/tcn/specs/tcn.spec

index f36e6beddd8ec7424a7c3a8feff85fa9ac98ad3e..68132890005e8aeebce8ac9305fb93c37d644341 100644 (file)
@@ -7,6 +7,7 @@ DATA = tcn--1.0.sql
 PGFILEDESC = "tcn - trigger function notifying listeners"
 
 ISOLATION = tcn
+ISOLATION_OPTS = --load-extension=tcn
 
 ifdef USE_PGXS
 PG_CONFIG = pg_config
index 872039813920ab92ab701d97aa748ffda1bf291b..fb9e7305fca84aa7b3130ec22f47d0bf2220173b 100644 (file)
@@ -7,7 +7,6 @@
 
 setup
 {
-  CREATE EXTENSION tcn;
   CREATE TABLE mytable (key int PRIMARY KEY, value text);
   CREATE TRIGGER tcntrig AFTER INSERT OR UPDATE OR DELETE ON mytable
     FOR EACH ROW EXECUTE FUNCTION triggered_change_notification(mychannel);