summaryrefslogtreecommitdiff
path: root/contrib/intarray/_int_op.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/intarray/_int_op.c')
-rw-r--r--contrib/intarray/_int_op.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/intarray/_int_op.c b/contrib/intarray/_int_op.c
index 5aa27f039d1..9f30bb21737 100644
--- a/contrib/intarray/_int_op.c
+++ b/contrib/intarray/_int_op.c
@@ -243,7 +243,9 @@ sort(PG_FUNCTION_ARGS)
&& (d[3] == 'C' || d[3] == 'c'))
dir = 0;
if (dir == -1)
- elog(ERROR, "Invalid second parameter in function sort. It must be 'ASC' or 'DESC'.");
+ ereport(ERROR,
+ (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
+ errmsg("second parameter must be \"ASC\" or \"DESC\"")));
QSORT(a, dir);
PG_RETURN_POINTER(a);
}