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 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/include/parser/parse_type.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/include/parser') diff --git a/src/include/parser/parse_type.h b/src/include/parser/parse_type.h index 9208bad26d7..ab73148dcaa 100644 --- a/src/include/parser/parse_type.h +++ b/src/include/parser/parse_type.h @@ -20,7 +20,9 @@ typedef HeapTuple Type; extern Type LookupTypeName(ParseState *pstate, const TypeName *typeName, - int32 *typmod_p); + int32 *typmod_p, bool missing_ok); +extern Oid LookupTypeNameOid(ParseState *pstate, const TypeName *typeName, + bool missing_ok); extern Type typenameType(ParseState *pstate, const TypeName *typeName, int32 *typmod_p); extern Oid typenameTypeId(ParseState *pstate, const TypeName *typeName); -- cgit v1.2.3