Re: DROP FUNCTION IF EXISTS

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Magnus Hagander <mha(at)sollentuna(dot)net>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: DROP FUNCTION IF EXISTS
Date: 2006-09-25 14:16:13
Message-ID: 4517E4AD.3030809@sigaev.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Found a problem:
ereport(NOTICE,
(errmsg("function %s(%s) does not exist ... skipping",
NameListToString(functionName),
NameListToString(argTypes))));

NameListToString() suppose as an argument List of Value nodes, but
argTypes is a list of TypeName...

Andrew Dunstan wrote:
> Teodor Sigaev wrote:
>> postgres=# drop type if exists foo;
>> NOTICE: type "foo" does not exist, skipping
>> DROP TYPE
>> postgres=# drop table if exists foo;
>> NOTICE: table "foo" does not exist, skipping
>> DROP TABLE
>> postgres=# drop function if exists foo();
>> NOTICE: function foo() does not exist ... skipping
>> DROP FUNCTION
>> postgres=# drop function if exists foo(int);
>> NOTICE: function foo(
>> ^^^ here psql is stopped..
>>
>>
>
> Yes, this appears to be a bug, not related to encoding etc. Maybe we
> should be calling func_signature_string in generating this error.
>
> I will look at it when I get a chance, might be a few days.
>
> cheers
>
> andrew

--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2006-09-25 15:11:44 Re: DROP FUNCTION IF EXISTS
Previous Message Jim C. Nasby 2006-09-25 14:14:18 Re: ReadBuffer(P_NEW) versus valid buffers