diff options
author | Alexander Korotkov | 2020-03-31 14:51:57 +0000 |
---|---|---|
committer | Alexander Korotkov | 2020-03-31 14:51:57 +0000 |
commit | 02a5786df24b12c6379ef1b0375b70b8a9fb4925 (patch) | |
tree | 7aa1d4985553788872531b3ee5dbf3a416059b79 /src/backend/commands/opclasscmds.c | |
parent | 087d3d0583cf292146a7385746d1f5b53eeeaee6 (diff) |
Improve error reporting in opclasscmds.c
This commit improves error reporting introduced by 911e702077. It puts
argument of errmsg() to the single line for easier grepping source for error
text. Also it improves wording of errhint().
Diffstat (limited to 'src/backend/commands/opclasscmds.c')
-rw-r--r-- | src/backend/commands/opclasscmds.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/backend/commands/opclasscmds.c b/src/backend/commands/opclasscmds.c index f1026de7565..7322cbc154e 100644 --- a/src/backend/commands/opclasscmds.c +++ b/src/backend/commands/opclasscmds.c @@ -1156,16 +1156,14 @@ assignProcTypes(OpFamilyMember *member, Oid amoid, Oid typeoid, (OidIsValid(member->righttype) && member->righttype != typeoid)) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("associated data types for opclass options " - "parsing functions must match opclass input type"))); + errmsg("associated data types for opclass options parsing functions must match opclass input type"))); } else { if (member->lefttype != member->righttype) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("left and right associated data types for " - "opclass options parsing functions must match"))); + errmsg("left and right associated data types for opclass options parsing functions must match"))); } if (procform->prorettype != VOIDOID || @@ -1174,9 +1172,10 @@ assignProcTypes(OpFamilyMember *member, Oid amoid, Oid typeoid, ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), errmsg("invalid opclass options parsing function"), - errhint("opclass options parsing function must have signature '%s'", + errhint("Valid signature of opclass options parsing function is '%s'.", "(internal) RETURNS void"))); } + /* * btree comparison procs must be 2-arg procs returning int4. btree * sortsupport procs must take internal and return void. btree in_range |