pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew@dunslane.net>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Avoid uninitialized value error in TAP tests' Cluster->psql
Date: Mon, 30 Jun 2025 14:15:40 +0000
Message-ID: <E1uWFIK-0043Dq-1D@gemulon.postgresql.org> (raw)

Avoid uninitialized value error in TAP tests' Cluster->psql

If the method is called in scalar context and we didn't pass in a stderr
handle, one won't be created. However, some error paths assume that it
exists, so in this case create a dummy stderr to avoid the resulting
perl error.

Per gripe from Oleg Tselebrovskiy <o.tselebrovskiy@postgrespro.ru> and
adapted from his patch.

Discussion: https://postgr.es/m/378eac5de4b8ecb5be7bcdf2db9d2c4d@postgrespro.ru

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c3e28e9fd936b83dbb6dfb5003b6221d98f8469c

Modified Files
--------------
src/test/perl/PostgreSQL/Test/Cluster.pm | 8 ++++++++
1 file changed, 8 insertions(+)



Message-ID: <E1uWFIK-0043Dq-1D@gemulon.postgresql.org>
Permalink:  ../E1uWFIK-0043Dq-1D@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1uWFIK-0043Dq-1D@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: andrew@dunslane.net, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Avoid uninitialized value error in TAP tests' Cluster->psql
  In-Reply-To: <E1uWFIK-0043Dq-1D@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