Skip site navigation (1) Skip section navigation (2)

Re: PATCH: Improve DROP FUNCTION hint

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PATCH: Improve DROP FUNCTION hint
Date: 2012-06-26 17:35:29
Message-ID: CA+TgmobFCxZRFw0wmEH_Rmnk8op5fTsYV-xL1UsPsbU-RC5oiA@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Mon, Jun 11, 2012 at 11:12 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Sat, Jun 9, 2012 at 11:42 AM, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> wrote:
>> 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.
>
> +1.

Committed.

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

In response to

pgsql-hackers by date

Next:From: Josh BerkusDate: 2012-06-26 17:41:11
Subject: Re: pg_stat_lwlocks view - lwlocks statistics
Previous:From: Nils GorollDate: 2012-06-26 17:02:31
Subject: why roll-your-own s_lock? / improving scalability

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group