PATCH: Improve DROP FUNCTION hint

Поиск
Список
Период
Сортировка
От Dean Rasheed
Тема PATCH: Improve DROP FUNCTION hint
Дата
Msg-id CAEZATCWFx2Z8j=-MfT3M=WMkiayyWZA+yKzbP0Ld2tGyVW8GsA@mail.gmail.com
обсуждение исходный текст
Ответы Re: PATCH: Improve DROP FUNCTION hint  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Hi,

Attached is a small patch to improve the HINT message produced by
CREATE OR REPLACE FUNCTION when the new function definition conflicts
with the old definition. With this patch the hint now includes the
function's name and signature as a directly pasteable SQL command. So,
for example, instead of

psql:functions.sql:70: ERROR:  cannot change return type of existing function
HINT:  Use DROP FUNCTION first.

it now says

psql:functions.sql:70: ERROR:  cannot change return type of existing function
HINT:  Use DROP FUNCTION foo(integer,integer) first.

which saves having to open the file, find the function and then type
in the DROP statement manually.

Regards,
Dean

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: log_newpage header comment
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Add ERROR msg for GLOBAL/LOCAL TEMP is not yet implemented