diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-11-27 21:43:55 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-11-27 21:43:55 +0100 |
commit | c86c92200c331f0099ab95edd35b9f73c177b72b (patch) | |
tree | 0132917d3f18c12d6517b5edb4d166468739c989 /src/exchangedb/exchange-0001.sql | |
parent | cf2e37cd876651e799893e8fe5babb51a9e12dd7 (diff) | |
download | exchange-c86c92200c331f0099ab95edd35b9f73c177b72b.tar.xz |
-db tests pass again
Diffstat (limited to 'src/exchangedb/exchange-0001.sql')
-rw-r--r-- | src/exchangedb/exchange-0001.sql | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/exchangedb/exchange-0001.sql b/src/exchangedb/exchange-0001.sql index 49b5f8b78..5ce38c286 100644 --- a/src/exchangedb/exchange-0001.sql +++ b/src/exchangedb/exchange-0001.sql @@ -177,7 +177,7 @@ BEGIN 'SELECT exchange.%s_table_%s (%s)'::text ,rec.action ,rec.name - ,0 + ,quote_literal('0') ); IF (rec.by_range OR (num_partitions = 0)) @@ -189,7 +189,7 @@ BEGIN EXECUTE FORMAT( 'CREATE TABLE exchange.%s_default' ' PARTITION OF %s' - ' FOR DEFAULT' + ' DEFAULT' ,rec.name ,rec.name ); @@ -238,14 +238,15 @@ BEGIN ,rec.name ); ELSE - IF (num_partitions = 0) + IF ( (num_partitions = 0) OR + (rec.by_range) ) THEN -- Constrain default table EXECUTE FORMAT( 'SELECT exchange.%s_table_%s (%s)'::text ,rec.action ,rec.name - ,'default' + ,quote_literal('default') ); ELSE -- Constrain each partition @@ -254,7 +255,7 @@ BEGIN 'SELECT exchange.%s_table_%s (%s)'::text ,rec.action ,rec.name - ,i + ,quote_literal(i) ); END LOOP; END IF; |