summaryrefslogtreecommitdiff
path: root/src/exchangedb/0002-kyc_attributes.sql
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-07-30 14:02:40 +0200
committerChristian Grothoff <christian@grothoff.org>2023-07-30 14:02:40 +0200
commita29f04189c8b7457ede0b3ac01222b88853325a8 (patch)
treec00400029ee53863481c2e30ffea5c275685733c /src/exchangedb/0002-kyc_attributes.sql
parentafa706914fefc90812c0bda01341e1dcfca06840 (diff)
downloadexchange-a29f04189c8b7457ede0b3ac01222b88853325a8.tar.gz
exchange-a29f04189c8b7457ede0b3ac01222b88853325a8.tar.bz2
exchange-a29f04189c8b7457ede0b3ac01222b88853325a8.zip
unify to TEXT instead of mixing TEXT and VARCHAR
Diffstat (limited to 'src/exchangedb/0002-kyc_attributes.sql')
-rw-r--r--src/exchangedb/0002-kyc_attributes.sql10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/exchangedb/0002-kyc_attributes.sql b/src/exchangedb/0002-kyc_attributes.sql
index d02e2568f..fd36684de 100644
--- a/src/exchangedb/0002-kyc_attributes.sql
+++ b/src/exchangedb/0002-kyc_attributes.sql
@@ -15,20 +15,20 @@
--
CREATE OR REPLACE FUNCTION create_table_kyc_attributes(
- IN partition_suffix VARCHAR DEFAULT NULL
+ IN partition_suffix TEXT DEFAULT NULL
)
RETURNS VOID
LANGUAGE plpgsql
AS $$
DECLARE
- table_name VARCHAR DEFAULT 'kyc_attributes';
+ table_name TEXT DEFAULT 'kyc_attributes';
BEGIN
PERFORM create_partitioned_table(
'CREATE TABLE IF NOT EXISTS %I'
'(kyc_attributes_serial_id BIGINT GENERATED BY DEFAULT AS IDENTITY'
',h_payto BYTEA PRIMARY KEY CHECK (LENGTH(h_payto)=32)'
',kyc_prox BYTEA NOT NULL CHECK (LENGTH(kyc_prox)=32)'
- ',provider VARCHAR NOT NULL'
+ ',provider TEXT NOT NULL'
',collection_time INT8 NOT NULL'
',expiration_time INT8 NOT NULL'
',encrypted_attributes BYTEA NOT NULL'
@@ -92,13 +92,13 @@ COMMENT ON FUNCTION create_table_kyc_attributes
CREATE OR REPLACE FUNCTION constrain_table_kyc_attributes(
- IN partition_suffix VARCHAR
+ IN partition_suffix TEXT
)
RETURNS void
LANGUAGE plpgsql
AS $$
DECLARE
- table_name VARCHAR DEFAULT 'kyc_attributes';
+ table_name TEXT DEFAULT 'kyc_attributes';
BEGIN
table_name = concat_ws('_', table_name, partition_suffix);
EXECUTE FORMAT (