From a29f04189c8b7457ede0b3ac01222b88853325a8 Mon Sep 17 00:00:00 2001
From: Christian Grothoff <christian@grothoff.org>
Date: Sun, 30 Jul 2023 14:02:40 +0200
Subject: unify to TEXT instead of mixing TEXT and VARCHAR

---
 src/exchangedb/0002-legitimization_requirements.sql | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'src/exchangedb/0002-legitimization_requirements.sql')

diff --git a/src/exchangedb/0002-legitimization_requirements.sql b/src/exchangedb/0002-legitimization_requirements.sql
index 892556aab..d806eb424 100644
--- a/src/exchangedb/0002-legitimization_requirements.sql
+++ b/src/exchangedb/0002-legitimization_requirements.sql
@@ -15,7 +15,7 @@
 --
 
 CREATE FUNCTION create_table_legitimization_requirements(
-  IN partition_suffix VARCHAR DEFAULT NULL
+  IN partition_suffix TEXT DEFAULT NULL
 )
 RETURNS VOID
 LANGUAGE plpgsql
@@ -26,7 +26,7 @@ BEGIN
       '(legitimization_requirement_serial_id BIGINT GENERATED BY DEFAULT AS IDENTITY'
       ',h_payto BYTEA NOT NULL CHECK (LENGTH(h_payto)=32)'
       ',reserve_pub BYTEA'
-      ',required_checks VARCHAR NOT NULL'
+      ',required_checks TEXT NOT NULL'
       ',UNIQUE (h_payto, required_checks)'
     ') %s ;'
     ,'legitimization_requirements'
@@ -68,13 +68,13 @@ $$;
 -- We need a separate function for this, as we call create_table only once but need to add
 -- those constraints to each partition which gets created
 CREATE FUNCTION constrain_table_legitimization_requirements(
-  IN partition_suffix VARCHAR
+  IN partition_suffix TEXT
 )
 RETURNS void
 LANGUAGE plpgsql
 AS $$
 DECLARE
-  partition_name VARCHAR;
+  partition_name TEXT;
 BEGIN
   partition_name = concat_ws('_', 'legitimization_requirements', partition_suffix);
   EXECUTE FORMAT (
-- 
cgit v1.2.3

