pgsql: Avoid null pointer dereference if error result lacks SQLSTATE.

2020-11-01 Thread Tom Lane
Avoid null pointer dereference if error result lacks SQLSTATE. Although error results received from the backend should always have a SQLSTATE field, ones generated by libpq won't, making this code vulnerable to a crash after, say, untimely loss of connection. Noted by Coverity. Oversight in commi

pgsql: Avoid null pointer dereference if error result lacks SQLSTATE.

2020-11-01 Thread Tom Lane
Avoid null pointer dereference if error result lacks SQLSTATE. Although error results received from the backend should always have a SQLSTATE field, ones generated by libpq won't, making this code vulnerable to a crash after, say, untimely loss of connection. Noted by Coverity. Oversight in commi

pgsql: Avoid null pointer dereference if error result lacks SQLSTATE.

2020-11-01 Thread Tom Lane
Avoid null pointer dereference if error result lacks SQLSTATE. Although error results received from the backend should always have a SQLSTATE field, ones generated by libpq won't, making this code vulnerable to a crash after, say, untimely loss of connection. Noted by Coverity. Oversight in commi

pgsql: Avoid null pointer dereference if error result lacks SQLSTATE.

2020-11-01 Thread Tom Lane
Avoid null pointer dereference if error result lacks SQLSTATE. Although error results received from the backend should always have a SQLSTATE field, ones generated by libpq won't, making this code vulnerable to a crash after, say, untimely loss of connection. Noted by Coverity. Oversight in commi

pgsql: Avoid null pointer dereference if error result lacks SQLSTATE.

2020-11-01 Thread Tom Lane
Avoid null pointer dereference if error result lacks SQLSTATE. Although error results received from the backend should always have a SQLSTATE field, ones generated by libpq won't, making this code vulnerable to a crash after, say, untimely loss of connection. Noted by Coverity. Oversight in commi

pgsql: Avoid null pointer dereference if error result lacks SQLSTATE.

2020-11-01 Thread Tom Lane
Avoid null pointer dereference if error result lacks SQLSTATE. Although error results received from the backend should always have a SQLSTATE field, ones generated by libpq won't, making this code vulnerable to a crash after, say, untimely loss of connection. Noted by Coverity. Oversight in commi

pgsql: Avoid null pointer dereference if error result lacks SQLSTATE.

2020-11-01 Thread Tom Lane
Avoid null pointer dereference if error result lacks SQLSTATE. Although error results received from the backend should always have a SQLSTATE field, ones generated by libpq won't, making this code vulnerable to a crash after, say, untimely loss of connection. Noted by Coverity. Oversight in commi