pgsql: Allow referring to functions without arguments when unique

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Allow referring to functions without arguments when unique
Date: 2017-03-15 03:59:52
Message-ID: E1co06K-0003Zw-Lf@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Allow referring to functions without arguments when unique

In DDL commands referring to an existing function, allow omitting the
argument list if the function name is unique in its schema, per SQL
standard.

This uses the same logic that the regproc type uses for finding
functions by name only.

Reviewed-by: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/aefeb68741fb9456f14b4d690b0c646e532fea6b

Modified Files
--------------
doc/src/sgml/ref/alter_extension.sgml | 2 +-
doc/src/sgml/ref/alter_function.sgml | 13 +++++----
doc/src/sgml/ref/alter_opfamily.sgml | 7 +++--
doc/src/sgml/ref/comment.sgml | 2 +-
doc/src/sgml/ref/create_cast.sgml | 6 ++--
doc/src/sgml/ref/create_transform.sgml | 12 +++++---
doc/src/sgml/ref/drop_function.sgml | 35 ++++++++++++++++++++---
doc/src/sgml/ref/grant.sgml | 2 +-
doc/src/sgml/ref/revoke.sgml | 2 +-
doc/src/sgml/ref/security_label.sgml | 2 +-
src/backend/nodes/copyfuncs.c | 1 +
src/backend/nodes/equalfuncs.c | 1 +
src/backend/parser/gram.y | 27 ++++++++++++++++++
src/backend/parser/parse_func.c | 37 +++++++++++++++++++++++--
src/include/nodes/parsenodes.h | 3 ++
src/test/regress/expected/create_function_3.out | 11 +++++++-
src/test/regress/sql/create_function_3.sql | 8 ++++++
17 files changed, 143 insertions(+), 28 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2017-03-15 04:14:23 Re: pgsql: hash: Add write-ahead logging support.
Previous Message Tom Lane 2017-03-15 03:48:17 Re: pgsql: hash: Add write-ahead logging support.