]> granicus.if.org Git - postgresql/commit
Make DROP IF EXISTS more consistently not fail
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Thu, 23 Jan 2014 17:40:29 +0000 (14:40 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Thu, 23 Jan 2014 17:40:29 +0000 (14:40 -0300)
commitb152c6cd0de1827ba58756e24e18110cf902182a
tree82d0ced551764509a60014e9996f3b4d634b4071
parent9f80f4835a55a1cbffcda5d23a617917f3286c14
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
17 files changed:
src/backend/catalog/namespace.c
src/backend/catalog/objectaddress.c
src/backend/commands/dropcmds.c
src/backend/commands/functioncmds.c
src/backend/commands/opclasscmds.c
src/backend/commands/tablecmds.c
src/backend/commands/typecmds.c
src/backend/parser/parse_func.c
src/backend/parser/parse_oper.c
src/backend/parser/parse_type.c
src/backend/utils/adt/regproc.c
src/include/catalog/namespace.h
src/include/parser/parse_type.h
src/pl/plpgsql/src/pl_comp.c
src/test/regress/expected/drop_if_exists.out
src/test/regress/expected/event_trigger.out
src/test/regress/sql/drop_if_exists.sql