summaryrefslogtreecommitdiff
path: root/src/pl
diff options
context:
space:
mode:
authorAlvaro Herrera2014-01-23 17:40:29 +0000
committerAlvaro Herrera2014-01-23 17:40:29 +0000
commitb152c6cd0de1827ba58756e24e18110cf902182a (patch)
tree82d0ced551764509a60014e9996f3b4d634b4071 /src/pl
parent9f80f4835a55a1cbffcda5d23a617917f3286c14 (diff)
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/pl')
-rw-r--r--src/pl/plpgsql/src/pl_comp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pl/plpgsql/src/pl_comp.c b/src/pl/plpgsql/src/pl_comp.c
index 05cd1710584..5afc2e50044 100644
--- a/src/pl/plpgsql/src/pl_comp.c
+++ b/src/pl/plpgsql/src/pl_comp.c
@@ -1665,7 +1665,7 @@ plpgsql_parse_wordtype(char *ident)
* Word wasn't found in the namespace stack. Try to find a data type with
* that name, but ignore shell types and complex types.
*/
- typeTup = LookupTypeName(NULL, makeTypeName(ident), NULL);
+ typeTup = LookupTypeName(NULL, makeTypeName(ident), NULL, false);
if (typeTup)
{
Form_pg_type typeStruct = (Form_pg_type) GETSTRUCT(typeTup);