pgsql: Handle PQresultErrorField(PG_DIAG_SQLSTATE) returning NULL in st - Mailing list pgsql-committers

From Andres Freund
Subject pgsql: Handle PQresultErrorField(PG_DIAG_SQLSTATE) returning NULL in st
Date
Msg-id E1ZPY5o-0000N5-Mb@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Handle PQresultErrorField(PG_DIAG_SQLSTATE) returning NULL in streamutil.c.

In ff27db5d I missed that PQresultErrorField() may return NULL if
there's no sqlstate associated with an error.

Spotted-By: Coverity
Reported-By: Michael Paquier
Discussion: CAB7nPqQ3o10SY6NVdU4pjq85GQTN5tbbkq2gnNUh2fBNU3rKyQ@mail.gmail.com
Backpatch: 9.5, like ff27db5d

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/7685963eeb16c377c2e0ff7b1852b7a8bc527270

Modified Files
--------------
src/bin/pg_basebackup/streamutil.c |    4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)


pgsql-committers by date:

Previous
From: Andres Freund
Date:
Subject: Re: pgsql: Replace our hacked version of ax_pthread.m4 with latest upstream
Next
From: Andres Freund
Date:
Subject: pgsql: Fix two off-by-one errors in bufmgr.c.