Re: 'create or replace function' no longer allows parameters

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: 'create or replace function' no longer allows parameters
Дата
Msg-id AANLkTimvcnT1zzF3sPaCkDIgebiWXl7O5uXHAMFYcph4@mail.gmail.com
обсуждение исходный текст
Ответ на 'create or replace function' no longer allows parameters  (David Gardner <dgardner@creatureshop.com>)
Список 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 по дате отправления:

Предыдущее
От: David Gardner
Дата:
Сообщение: 'create or replace function' no longer allows parameters
Следующее
От: Takahiro Itagaki
Дата:
Сообщение: InvalidXLogRecPtr in docs