Re: 'create or replace function' no longer allows parameters - Mailing list pgsql-hackers

From Robert Haas
Subject Re: 'create or replace function' no longer allows parameters
Date
Msg-id AANLkTimvcnT1zzF3sPaCkDIgebiWXl7O5uXHAMFYcph4@mail.gmail.com
Whole thread Raw
In response to 'create or replace function' no longer allows parameters  (David Gardner <dgardner@creatureshop.com>)
List pgsql-hackers
On Wed, Jun 9, 2010 at 8:55 PM, David Gardner <dgardner@creatureshop.com> wrote:
> In 8.4.4 I used to be able to rename input parameters via "create or replace
> function".
> In 9.0 beta2  this no longer is allowed, and I get a descriptive message
> informing me to use
> drop function instead, but I couldn't find this documented anywhere as a
> change between 8.4 and 9.0.

This is a consequence of the change to allow functions to be called
using named notation rather than positional notation.

http://developer.postgresql.org/pgdocs/postgres/sql-syntax-calling-funcs.html

There could be a view somewhere that depends on calling the function
using the old input parameter name, and we have no way to detect that
case, so we disallow changing or dropping names (but you can add them
where they aren't already present) so as to avoid silent view
breakage.  It's a bit unfortunate, but I'm not sure there's much help
for it.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company


pgsql-hackers by date:

Previous
From: David Gardner
Date:
Subject: 'create or replace function' no longer allows parameters
Next
From: Takahiro Itagaki
Date:
Subject: InvalidXLogRecPtr in docs