From b152c6cd0de1827ba58756e24e18110cf902182a Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Thu, 23 Jan 2014 14:40:29 -0300 Subject: Make DROP IF EXISTS more consistently not fail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/backend/commands/functioncmds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/commands/functioncmds.c') diff --git a/src/backend/commands/functioncmds.c b/src/backend/commands/functioncmds.c index 7763feccf97..350cb76ab8c 100644 --- a/src/backend/commands/functioncmds.c +++ b/src/backend/commands/functioncmds.c @@ -86,7 +86,7 @@ compute_return_type(TypeName *returnType, Oid languageOid, Type typtup; AclResult aclresult; - typtup = LookupTypeName(NULL, returnType, NULL); + typtup = LookupTypeName(NULL, returnType, NULL, false); if (typtup) { @@ -224,7 +224,7 @@ interpret_function_parameter_list(List *parameters, Type typtup; AclResult aclresult; - typtup = LookupTypeName(NULL, t, NULL); + typtup = LookupTypeName(NULL, t, NULL, false); if (typtup) { if (!((Form_pg_type) GETSTRUCT(typtup))->typisdefined) -- cgit v1.2.3