Re: Support EXCEPT for ALL SEQUENCES publications

From: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Support EXCEPT for ALL SEQUENCES publications
Date: 2026-05-27 21:51:59
Message-ID: CAN4CZFMCgy3rQW8pDrqD9TV2tk4gRTEHo8CXa2GU5wpMgCyEMQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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?

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Corey Huinker 2026-05-27 22:02:20 Re: Is there value in having optimizer stats for joins/foreignkeys?
Previous Message Jacob Champion 2026-05-27 21:39:53 Re: future of PQfn()