diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2014-01-23 14:40:29 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2014-01-23 14:40:29 -0300 |
commit | b152c6cd0de1827ba58756e24e18110cf902182a (patch) | |
tree | 82d0ced551764509a60014e9996f3b4d634b4071 /src/backend/utils/adt/regproc.c | |
parent | 9f80f4835a55a1cbffcda5d23a617917f3286c14 (diff) | |
download | postgresql-b152c6cd0de1827ba58756e24e18110cf902182a.tar.gz postgresql-b152c6cd0de1827ba58756e24e18110cf902182a.zip |
Make DROP IF EXISTS more consistently not fail
Some cases were still reporting errors and aborting, instead of a NOTICE
that the object was being skipped. This makes it more difficult to
cleanly handle pg_dump --clean, so change that to instead skip missing
objects properly.
Per bug #7873 reported by Dave Rolsky; apparently this affects a large
number of users.
Authors: Pavel Stehule and Dean Rasheed. Some tweaks by Álvaro Herrera
Diffstat (limited to 'src/backend/utils/adt/regproc.c')
-rw-r--r-- | src/backend/utils/adt/regproc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/utils/adt/regproc.c b/src/backend/utils/adt/regproc.c index 5023d163a50..5d73562a4fc 100644 --- a/src/backend/utils/adt/regproc.c +++ b/src/backend/utils/adt/regproc.c @@ -135,7 +135,7 @@ regprocin(PG_FUNCTION_ARGS) * pg_proc entries in the current search path. */ names = stringToQualifiedNameList(pro_name_or_oid); - clist = FuncnameGetCandidates(names, -1, NIL, false, false); + clist = FuncnameGetCandidates(names, -1, NIL, false, false, false); if (clist == NULL) ereport(ERROR, @@ -192,7 +192,7 @@ regprocout(PG_FUNCTION_ARGS) * qualify it. */ clist = FuncnameGetCandidates(list_make1(makeString(proname)), - -1, NIL, false, false); + -1, NIL, false, false, false); if (clist != NULL && clist->next == NULL && clist->oid == proid) nspname = NULL; @@ -279,7 +279,7 @@ regprocedurein(PG_FUNCTION_ARGS) */ parseNameAndArgTypes(pro_name_or_oid, false, &names, &nargs, argtypes); - clist = FuncnameGetCandidates(names, nargs, NIL, false, false); + clist = FuncnameGetCandidates(names, nargs, NIL, false, false, false); for (; clist; clist = clist->next) { |