summaryrefslogtreecommitdiff
path: root/src/exchangedb/0002-purse_decision.sql
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-11-27 21:21:04 +0100
committerChristian Grothoff <christian@grothoff.org>2022-11-27 21:21:04 +0100
commitcf2e37cd876651e799893e8fe5babb51a9e12dd7 (patch)
tree437047cc646fb1a3a86f4226fd5460bbe2b0c530 /src/exchangedb/0002-purse_decision.sql
parentf2ba02aab2b9bbd976107ecc4ac7e7d657a9d73a (diff)
downloadexchange-cf2e37cd876651e799893e8fe5babb51a9e12dd7.tar.gz
exchange-cf2e37cd876651e799893e8fe5babb51a9e12dd7.tar.bz2
exchange-cf2e37cd876651e799893e8fe5babb51a9e12dd7.zip
more work on SQL refactoring
Diffstat (limited to 'src/exchangedb/0002-purse_decision.sql')
-rw-r--r--src/exchangedb/0002-purse_decision.sql10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/exchangedb/0002-purse_decision.sql b/src/exchangedb/0002-purse_decision.sql
index f7a82810b..e738292cd 100644
--- a/src/exchangedb/0002-purse_decision.sql
+++ b/src/exchangedb/0002-purse_decision.sql
@@ -16,7 +16,7 @@
CREATE FUNCTION create_table_purse_decision(
- IN shard_suffix VARCHAR DEFAULT NULL
+ IN partition_suffix VARCHAR DEFAULT NULL
)
RETURNS VOID
LANGUAGE plpgsql
@@ -34,18 +34,18 @@ BEGIN
') %s ;'
,table_name
,'PARTITION BY HASH (purse_pub)'
- ,shard_suffix
+ ,partition_suffix
);
PERFORM comment_partitioned_table(
'Purses that were decided upon (refund or merge)'
,table_name
- ,shard_suffix
+ ,partition_suffix
);
PERFORM comment_partitioned_column(
'Public key of the purse'
,'purse_pub'
,table_name
- ,shard_suffix
+ ,partition_suffix
);
END
$$;
@@ -59,7 +59,7 @@ AS $$
DECLARE
table_name VARCHAR DEFAULT 'purse_decision';
BEGIN
- table_name = concat_ws('_', table_name, shard_suffix);
+ table_name = concat_ws('_', table_name, partition_suffix);
EXECUTE FORMAT (
'ALTER TABLE ' || table_name ||
' ADD CONSTRAINT ' || table_name || '_purse_action_serial_id_key'