pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Rowley <drowley@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Tidyup WARNING ereports in subscriptioncmds.c
Date: Thu, 06 Nov 2025 20:50:20 +0000
Message-ID: <E1vH6w0-005LTi-0Z@gemulon.postgresql.org> (raw)

Tidyup WARNING ereports in subscriptioncmds.c

A couple of ereports were making use of StringInfos as temporary storage
for the portions of the WARNING message.  One was doing this to avoid
having 2 separate ereports.  This was all fairly unnecessary and
resulted in more code rather than less code.

Refactor out the additional StringInfos and make
check_publications_origin_tables() use 2 ereports.

In passing, adjust pubnames to become a stack-allocated StringInfoData to
avoid having to palloc the temporary StringInfoData.  This follows on
from the efforts made in 6d0eba662.

Author: Mats Kindahl <mats.kindahl@gmail.com>
Reviewed-by: David Rowley <dgrowleyml@gmail.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>
Discussion: https://postgr.es/m/0b381b02-cab9-41f9-a900-ad6c8d26c1fc%40gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/448b6a4173d007c75ba30fed666b60f0bd1afe8b

Modified Files
--------------
src/backend/commands/subscriptioncmds.c | 59 +++++++++++++++------------------
1 file changed, 26 insertions(+), 33 deletions(-)



Message-ID: <E1vH6w0-005LTi-0Z@gemulon.postgresql.org>
Permalink:  ../E1vH6w0-005LTi-0Z@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vH6w0-005LTi-0Z@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: drowley@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Tidyup WARNING ereports in subscriptioncmds.c
  In-Reply-To: <E1vH6w0-005LTi-0Z@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox