diff options
author | Robert Haas <rhaas@postgresql.org> | 2014-04-08 10:27:56 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2014-04-08 10:27:56 -0400 |
commit | 0886fc6a5c75b294544263ea979b9cf6195407d9 (patch) | |
tree | 2cf04aae147dc80a980cab40a39d23af92822d0d /src/backend/parser/parse_oper.c | |
parent | 7ca32e255ba4f7e55bbdbcf0df996ac62798672b (diff) | |
download | postgresql-0886fc6a5c75b294544263ea979b9cf6195407d9.tar.gz postgresql-0886fc6a5c75b294544263ea979b9cf6195407d9.zip |
Add new to_reg* functions for error-free OID lookups.
These functions won't throw an error if the object doesn't exist,
or if (for functions and operators) there's more than one matching
object.
Yugo Nagata and Nozomi Anzai, reviewed by Amit Khandekar, Marti
Raudsepp, Amit Kapila, and me.
Diffstat (limited to 'src/backend/parser/parse_oper.c')
-rw-r--r-- | src/backend/parser/parse_oper.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/parser/parse_oper.c b/src/backend/parser/parse_oper.c index 99dbd30d758..a2b712d5161 100644 --- a/src/backend/parser/parse_oper.c +++ b/src/backend/parser/parse_oper.c @@ -407,7 +407,7 @@ oper(ParseState *pstate, List *opname, Oid ltypeId, Oid rtypeId, FuncCandidateList clist; /* Get binary operators of given name */ - clist = OpernameGetCandidates(opname, 'b'); + clist = OpernameGetCandidates(opname, 'b', false); /* No operators found? Then fail... */ if (clist != NULL) @@ -553,7 +553,7 @@ right_oper(ParseState *pstate, List *op, Oid arg, bool noError, int location) FuncCandidateList clist; /* Get postfix operators of given name */ - clist = OpernameGetCandidates(op, 'r'); + clist = OpernameGetCandidates(op, 'r', false); /* No operators found? Then fail... */ if (clist != NULL) @@ -631,7 +631,7 @@ left_oper(ParseState *pstate, List *op, Oid arg, bool noError, int location) FuncCandidateList clist; /* Get prefix operators of given name */ - clist = OpernameGetCandidates(op, 'l'); + clist = OpernameGetCandidates(op, 'l', false); /* No operators found? Then fail... */ if (clist != NULL) |