Re: Make all Perl warnings fatal

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Make all Perl warnings fatal
Date: 2024-01-16 11:08:47
Message-ID: CALj2ACUMXbNp2LJyoKWH-AHjzMKUEyzb6w4XAgN4FyJ4zq-hrw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 12, 2024 at 9:21 PM Bharath Rupireddy
<bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:
>
> On Fri, Jan 12, 2024 at 9:03 PM Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
> >
> > I would put this code
> >
> > my $core = $ret & 128 ? " (core dumped)" : "";
> > die "psql exited with signal "
> > . ($ret & 127)
> > . "$core: '$$stderr' while running '@psql_params'"
> > if $ret & 127;
> > $ret = $ret >> 8;
> >
> > inside a if (defined $ret) block.
> >
> > Then the behavior would be that the whole function returns undef on
> > timeout, which is usefully different from returning 0 (and matches
> > previous behavior).
>
> WFM.

I've attached a patch for the above change.

--
Bharath Rupireddy
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
v1-0001-Fix-an-issue-in-PostgreSQL-Test-Cluster-psql.patch application/octet-stream 1.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2024-01-16 11:17:23 Re: initdb's -c option behaves wrong way?
Previous Message Daniel Gustafsson 2024-01-16 10:37:47 Re: sql-merge.html Compatibility section, typo.