diff options
Diffstat (limited to 'contrib')
| -rw-r--r-- | contrib/spi/refint.c | 6 | ||||
| -rw-r--r-- | contrib/spi/timetravel.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/contrib/spi/refint.c b/contrib/spi/refint.c index 70def95ac5e..2fc894e72a1 100644 --- a/contrib/spi/refint.c +++ b/contrib/spi/refint.c @@ -182,7 +182,7 @@ check_primary_key(PG_FUNCTION_ARGS) pplan = SPI_prepare(sql, nkeys, argtypes); if (pplan == NULL) /* internal error */ - elog(ERROR, "check_primary_key: SPI_prepare returned %d", SPI_result); + elog(ERROR, "check_primary_key: SPI_prepare returned %s", SPI_result_code_string(SPI_result)); /* * Remember that SPI_prepare places plan in current memory context - @@ -395,7 +395,7 @@ check_foreign_key(PG_FUNCTION_ARGS) /* this shouldn't happen! SPI_ERROR_NOOUTFUNC ? */ if (oldval == NULL) /* internal error */ - elog(ERROR, "check_foreign_key: SPI_getvalue returned %d", SPI_result); + elog(ERROR, "check_foreign_key: SPI_getvalue returned %s", SPI_result_code_string(SPI_result)); newval = SPI_getvalue(newtuple, tupdesc, fnumber); if (newval == NULL || strcmp(oldval, newval) != 0) isequal = false; @@ -529,7 +529,7 @@ check_foreign_key(PG_FUNCTION_ARGS) pplan = SPI_prepare(sql, nkeys, argtypes); if (pplan == NULL) /* internal error */ - elog(ERROR, "check_foreign_key: SPI_prepare returned %d", SPI_result); + elog(ERROR, "check_foreign_key: SPI_prepare returned %s", SPI_result_code_string(SPI_result)); /* * Remember that SPI_prepare places plan in current memory context diff --git a/contrib/spi/timetravel.c b/contrib/spi/timetravel.c index 816cc549ae1..00f661e6b69 100644 --- a/contrib/spi/timetravel.c +++ b/contrib/spi/timetravel.c @@ -341,7 +341,7 @@ timetravel(PG_FUNCTION_ARGS) /* Prepare plan for query */ pplan = SPI_prepare(sql, natts, ctypes); if (pplan == NULL) - elog(ERROR, "timetravel (%s): SPI_prepare returned %d", relname, SPI_result); + elog(ERROR, "timetravel (%s): SPI_prepare returned %s", relname, SPI_result_code_string(SPI_result)); /* * Remember that SPI_prepare places plan in current memory context - |
