Fix an ereport syntax error when using PG 12.0

Since PG 12.3, the syntax of the ereport() function has changed
slightly. The change 97a603fe5c5ba25aa6e4e596fd7da7a401051d7b introduces
an ereport() call that only works using newer PG versions. This PR
changes the ereport() call to a PG 12.0 compatible syntax.
This commit is contained in:
Jan Nidzwetzki 2022-09-20 13:53:07 +02:00 committed by Jan Nidzwetzki
parent b451f0c521
commit db66a194b2

View File

@ -113,9 +113,10 @@ ts_bgw_job_run_config_check(Oid check, int32 job_id, Jsonb *config)
job_execute_function(funcexpr); job_execute_function(funcexpr);
else else
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("unsupported function type")), (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errdetail("Only functions are allowed as custom configuration checks"), errmsg("unsupported function type"),
errhint("Use a FUNCTION instead")); errdetail("Only functions are allowed as custom configuration checks"),
errhint("Use a FUNCTION instead")));
} }
/* Run the check function on a configuration. It will generate errors if there /* Run the check function on a configuration. It will generate errors if there