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-purse_deletion.sql | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

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

diff --git a/src/exchangedb/0002-purse_deletion.sql b/src/exchangedb/0002-purse_deletion.sql
index 6bbc24c87..45b2e85a9 100644
--- a/src/exchangedb/0002-purse_deletion.sql
+++ b/src/exchangedb/0002-purse_deletion.sql
@@ -15,13 +15,13 @@
 --
 
 CREATE OR REPLACE FUNCTION create_table_purse_deletion(
-  IN partition_suffix VARCHAR DEFAULT NULL
+  IN partition_suffix TEXT DEFAULT NULL
 )
 RETURNS VOID
 LANGUAGE plpgsql
 AS $$
 DECLARE
-  table_name VARCHAR DEFAULT 'purse_deletion';
+  table_name TEXT DEFAULT 'purse_deletion';
 BEGIN
   PERFORM create_partitioned_table(
     'CREATE TABLE IF NOT EXISTS %I'
@@ -51,13 +51,13 @@ COMMENT ON FUNCTION create_table_purse_deletion
 
 
 CREATE OR REPLACE FUNCTION constrain_table_purse_deletion(
-  IN partition_suffix VARCHAR DEFAULT NULL
+  IN partition_suffix TEXT DEFAULT NULL
 )
 RETURNS void
 LANGUAGE plpgsql
 AS $$
 DECLARE
-  table_name VARCHAR DEFAULT 'purse_deletion';
+  table_name TEXT DEFAULT 'purse_deletion';
 BEGIN
   table_name = concat_ws('_', table_name, partition_suffix);
   EXECUTE FORMAT (
@@ -74,7 +74,7 @@ RETURNS void
 LANGUAGE plpgsql
 AS $$
 DECLARE
-  table_name VARCHAR DEFAULT 'purse_requests';
+  table_name TEXT DEFAULT 'purse_requests';
 BEGIN
   EXECUTE FORMAT (
     'ALTER TABLE exchange.' || table_name ||
-- 
cgit v1.2.3

