mirror of https://github.com/citusdata/citus.git
Fix crash on Windows where there is no detail
parent
f54ed5d3b0
commit
42ddfa176d
|
@ -1233,9 +1233,10 @@ ReportCopyError(MultiConnection *connection, PGresult *result)
|
||||||
{
|
{
|
||||||
/* probably a constraint violation, show remote message and detail */
|
/* probably a constraint violation, show remote message and detail */
|
||||||
char *remoteDetail = PQresultErrorField(result, PG_DIAG_MESSAGE_DETAIL);
|
char *remoteDetail = PQresultErrorField(result, PG_DIAG_MESSAGE_DETAIL);
|
||||||
|
bool haveDetail = remoteDetail != NULL;
|
||||||
|
|
||||||
ereport(ERROR, (errmsg("%s", remoteMessage),
|
ereport(ERROR, (errmsg("%s", remoteMessage),
|
||||||
errdetail("%s", remoteDetail)));
|
haveDetail ? errdetail("%s", remoteDetail) : 0));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -2618,7 +2618,6 @@ FROM (
|
||||||
) AS ftop
|
) AS ftop
|
||||||
LIMIT 5;
|
LIMIT 5;
|
||||||
ERROR: value too long for type character(1)
|
ERROR: value too long for type character(1)
|
||||||
DETAIL: (null)
|
|
||||||
SELECT * FROM coerce_agg;
|
SELECT * FROM coerce_agg;
|
||||||
user_id | value_1_agg
|
user_id | value_1_agg
|
||||||
---------+-------------
|
---------+-------------
|
||||||
|
@ -2637,7 +2636,6 @@ FROM (
|
||||||
) AS ftop
|
) AS ftop
|
||||||
LIMIT 5;
|
LIMIT 5;
|
||||||
ERROR: value too long for type character(1)
|
ERROR: value too long for type character(1)
|
||||||
DETAIL: (null)
|
|
||||||
-- char(1) -> char(5)
|
-- char(1) -> char(5)
|
||||||
ALTER TABLE coerce_events ALTER COLUMN value_1 TYPE char(1) USING value_1::char(1);
|
ALTER TABLE coerce_events ALTER COLUMN value_1 TYPE char(1) USING value_1::char(1);
|
||||||
ALTER TABLE coerce_agg ALTER COLUMN value_1_agg TYPE char(5);
|
ALTER TABLE coerce_agg ALTER COLUMN value_1_agg TYPE char(5);
|
||||||
|
|
Loading…
Reference in New Issue