mirror of https://github.com/citusdata/citus.git
Fix crash on Windows where there is no detail
parent
7bbdb9e46e
commit
827b951d09
|
@ -1234,6 +1234,11 @@ ReportCopyError(MultiConnection *connection, PGresult *result)
|
|||
/* probably a constraint violation, show remote message and detail */
|
||||
char *remoteDetail = PQresultErrorField(result, PG_DIAG_MESSAGE_DETAIL);
|
||||
|
||||
if (remoteDetail == NULL)
|
||||
{
|
||||
remoteDetail = "(null)";
|
||||
}
|
||||
|
||||
ereport(ERROR, (errmsg("%s", remoteMessage),
|
||||
errdetail("%s", remoteDetail)));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue