Fw: BUG #3695: Pgsql does not report non existing function

From: "Roger Moloney" <ramoloney(at)hotmail(dot)com>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: Fw: BUG #3695: Pgsql does not report non existing function
Date: 2007-10-30 17:55:53
Message-ID: BAY137-DS1E22E2C80A9210785D8CFAF920@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

See below, clarification of bug report.

--------------------------------------------------
From: "Roger Moloney" <ramoloney(at)hotmail(dot)com>
Sent: Friday, October 26, 2007 8:25 AM
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: [BUGS] BUG #3695: Pgsql does not report non existing function

> Hi Tom,
>
> Thanks for the reply but you have misunderstood my report.
>
> Yes, the function will be reported as not existing at run-time when the
> code is executed.
> This approach is easy and workable for small test programs.
>
> It is not workable for large projects which may have thousands of lines of
> ported code in pgsql.
> I would like to see the non-existing function reported (perhaps I need to
> put different log options on) at compile time.
> It is not possible for me to exercise all code paths to find functions
> that do not exist.
>
> Surely, the compiler must know or could produce a warning about
> non-existing functions at compile time.
>
> thanks again for the reply,
> Roger
>
> P.S: I think postgres is a great product. well done.
>
> --------------------------------------------------
> From: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> Sent: Thursday, October 25, 2007 3:36 PM
> To: "Roger" <ramoloney(at)hotmail(dot)com>
> Cc: <pgsql-bugs(at)postgresql(dot)org>
> Subject: Re: [BUGS] BUG #3695: Pgsql does not report non existing function
>
>> "Roger" <ramoloney(at)hotmail(dot)com> writes:
>>> Description: Pgsql does not report non existing function
>>
>> Works fine for me:
>>
>> regression=# create function foo() returns int as $$
>> regression$# declare x int;
>> regression$# begin
>> regression$# x := nosuchfunc(42);
>> regression$# end$$ language plpgsql;
>> CREATE FUNCTION
>> regression=# select foo();
>> ERROR: function nosuchfunc(integer) does not exist
>> LINE 1: SELECT nosuchfunc(42)
>> ^
>> HINT: No function matches the given name and argument types. You might
>> need to add explicit type casts.
>> QUERY: SELECT nosuchfunc(42)
>> CONTEXT: PL/pgSQL function "foo" line 3 at assignment
>> regression=#
>>
>> regards, tom lane
>>
>

Browse pgsql-bugs by date

  From Date Subject
Next Message Adam Tomjack 2007-10-31 02:36:36 I incrementally altered my database into a state where backups couldn't be restored.
Previous Message Moiz Kothari 2007-10-30 11:26:33 Re: BUG #3709: Changing Table Owner