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

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

diff --git a/src/exchangedb/0002-history_requests.sql b/src/exchangedb/0002-history_requests.sql
index 2694a7cea..d6a81c458 100644
--- a/src/exchangedb/0002-history_requests.sql
+++ b/src/exchangedb/0002-history_requests.sql
@@ -16,13 +16,13 @@
 
 
 CREATE FUNCTION create_table_history_requests(
-  IN shard_suffix VARCHAR DEFAULT NULL
+  IN shard_suffix TEXT DEFAULT NULL
 )
 RETURNS VOID
 LANGUAGE plpgsql
 AS $$
 DECLARE
-  table_name VARCHAR DEFAULT 'history_requests';
+  table_name TEXT DEFAULT 'history_requests';
 BEGIN
   PERFORM create_partitioned_table(
     'CREATE TABLE %I '
@@ -64,13 +64,13 @@ END $$;
 
 
 CREATE FUNCTION constrain_table_history_requests(
-  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('_', 'history_requests', partition_suffix);
 
@@ -88,7 +88,7 @@ RETURNS VOID
 LANGUAGE plpgsql
 AS $$
 DECLARE
-  table_name VARCHAR DEFAULT 'history_requests';
+  table_name TEXT DEFAULT 'history_requests';
 BEGIN
   EXECUTE FORMAT (
     'ALTER TABLE ' || table_name ||
-- 
cgit v1.2.3

