pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: pgsql-committers@postgresql.org
Subject: pgsql: Allow referring to functions without arguments when unique
Date: Wed, 15 Mar 2017 03:59:52 +0000
Message-ID: <E1co06K-0003Zw-Lf@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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.paquier@gmail.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(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1co06K-0003Zw-Lf@gemulon.postgresql.org>
Permalink:  ../E1co06K-0003Zw-Lf@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1co06K-0003Zw-Lf@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: peter_e@gmx.net
  Subject: Re: pgsql: Allow referring to functions without arguments when unique
  In-Reply-To: <E1co06K-0003Zw-Lf@gemulon.postgresql.org>
  References: <E1co06K-0003Zw-Lf@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox