gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-exchange] 52/124: drop functions after use


From: gnunet
Subject: [taler-exchange] 52/124: drop functions after use
Date: Tue, 17 Sep 2024 21:27:44 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to tag cg-aml-branch-compiles
in repository exchange.

commit afb8be370f353c5f1ab2ef166279d2fb8cc69860
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Jun 3 21:17:47 2024 +0200

    drop functions after use
---
 src/exchangedb/exchange_do_create_tables.sql | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/src/exchangedb/exchange_do_create_tables.sql 
b/src/exchangedb/exchange_do_create_tables.sql
index 938af2b17..58d28ca14 100644
--- a/src/exchangedb/exchange_do_create_tables.sql
+++ b/src/exchangedb/exchange_do_create_tables.sql
@@ -100,7 +100,10 @@ BEGIN
           ,rec.name
         );
       END IF;
-
+      EXECUTE FORMAT(
+        'DROP FUNCTION exchange.create_table_%s'::text
+          ,rec.name
+        );
     -- "alter" actions apply to master and partitions
     WHEN 'alter'
     THEN
@@ -109,6 +112,10 @@ BEGIN
         'SELECT exchange.alter_table_%s ()'::text
         ,rec.name
       );
+      EXECUTE FORMAT(
+        'DROP FUNCTION exchange.alter_table_%s'::text
+          ,rec.name
+        );
     -- Constrain action apply to master OR each partition
     WHEN 'constrain'
     THEN
@@ -141,6 +148,10 @@ BEGIN
           END LOOP;
         END IF;
       END IF;
+      EXECUTE FORMAT(
+        'DROP FUNCTION exchange.constrain_table_%s'::text
+          ,rec.name
+        );
     -- Foreign actions only apply if partitioning is off
     WHEN 'foreign'
     THEN
@@ -153,12 +164,20 @@ BEGIN
           ,NULL
         );
       END IF;
+      EXECUTE FORMAT(
+        'DROP FUNCTION exchange.foreign_table_%s'::text
+          ,rec.name
+        );
     WHEN 'master'
     THEN
       EXECUTE FORMAT(
         'SELECT exchange.master_table_%s ()'::text
         ,rec.name
       );
+      EXECUTE FORMAT(
+        'DROP FUNCTION exchange.master_table_%s'::text
+          ,rec.name
+        );
     ELSE
       ASSERT FALSE, 'unsupported action type: ' || rec.action;
     END CASE;  -- END CASE (rec.action)

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]