Re: Support EXCEPT for ALL SEQUENCES publications - Mailing list pgsql-hackers

From Zsolt Parragi
Subject Re: Support EXCEPT for ALL SEQUENCES publications
Date
Msg-id CAN4CZFMCgy3rQW8pDrqD9TV2tk4gRTEHo8CXa2GU5wpMgCyEMQ@mail.gmail.com
Whole thread
In response to Re: Support EXCEPT for ALL SEQUENCES publications  (Shlok Kyal <shlok.kyal.oss@gmail.com>)
List pgsql-hackers
Hello!

+                    if (footers[0] == NULL)
+                        footers[0] = pg_strdup(tmpbuf.data);
+                    else if (footers[1] == NULL)
+                        footers[1] = pg_strdup(tmpbuf.data);
+                    else
+                        footers[2] = pg_strdup(tmpbuf.data);
+                    resetPQExpBuffer(&tmpbuf);

Shouldn't the matching free calls also updated, this now leaks footers[2]?

+                              "\n AND NOT EXISTS (\n"
+                              "     SELECT 1\n"
+                              "     FROM pg_catalog.pg_publication_rel pr\n"
+                              "     WHERE pr.prpubid = p.oid AND\n"
+                              "     pr.prrelid = '%s')"

Isn't a pr.prexcept check missing from this? It is included in other queries.

-        /* EXCEPT clause is not supported with ALTER PUBLICATION */
-        Assert(exceptseqs == NIL);
-

Would it be worth it to keep a more restricted assert, saying that
EXCEPT clause is only supported for ALTER PUBLICATION ... SET?



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Proposal: Conflict log history table for Logical Replication
Next
From: Corey Huinker
Date:
Subject: Re: Is there value in having optimizer stats for joins/foreignkeys?