aboutsummaryrefslogtreecommitdiff
path: root/contrib/spi/refint.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/spi/refint.c')
-rw-r--r--contrib/spi/refint.c6
1 files changed, 3 insertions, 3 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