postgresql/src/include/parser
Tom Lane bfb456c1b9 Improve error reporting for DROP FUNCTION/PROCEDURE/AGGREGATE/ROUTINE.
These commands allow the argument type list to be omitted if there is
just one object that matches by name.  However, if that syntax was
used with DROP IF EXISTS and there was more than one match, you got
a "function ... does not exist, skipping" notice message rather than a
truthful complaint about the ambiguity.  This was basically due to
poor factorization and a rats-nest of logic, so refactor the relevant
lookup code to make it cleaner.

Note that this amounts to narrowing the scope of which sorts of
error conditions IF EXISTS will bypass.  Per discussion, we only
intend it to skip no-such-object cases, not multiple-possible-matches
cases.

Per bug #15572 from Ash Marath.  Although this definitely seems like
a bug, it's not clear that people would thank us for changing the
behavior in minor releases, so no back-patch.

David Rowley, reviewed by Julien Rouhaud and Pavel Stehule

Discussion: https://postgr.es/m/15572-ed1b9ed09503de8a@postgresql.org
2019-03-21 11:52:08 -04:00
..
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
analyze.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
gramparse.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
kwlist.h Create the infrastructure for planner support functions. 2019-02-09 18:08:48 -05:00
parse_agg.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
parse_clause.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
parse_coerce.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
parse_collate.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
parse_cte.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
parse_enr.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
parse_expr.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
parse_func.h Improve error reporting for DROP FUNCTION/PROCEDURE/AGGREGATE/ROUTINE. 2019-03-21 11:52:08 -04:00
parse_node.h Renaming for new subscripting mechanism 2019-02-01 12:50:32 -03:00
parse_oper.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
parse_param.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
parse_relation.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
parse_target.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
parse_type.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
parse_utilcmd.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
parser.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
parsetree.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
scanner.h Replace the data structure used for keyword lookup. 2019-01-06 17:02:57 -05:00
scansup.h Update copyright for 2019 2019-01-02 12:44:25 -05:00