[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pgsql-bugs
Subject:    Fw: [BUGS] BUG #3695: Pgsql does not report non existing function
From:       "Roger Moloney" <ramoloney () hotmail ! com>
Date:       2007-10-30 17:55:53
Message-ID: BAY137-DS1E22E2C80A9210785D8CFAF920 () phx ! gbl
[Download RAW message or body]

See below, clarification of bug report.

--------------------------------------------------
From: "Roger Moloney" <ramoloney@hotmail.com>
Sent: Friday, October 26, 2007 8:25 AM
To: "Tom Lane" <tgl@sss.pgh.pa.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@sss.pgh.pa.us>
> Sent: Thursday, October 25, 2007 3:36 PM
> To: "Roger" <ramoloney@hotmail.com>
> Cc: <pgsql-bugs@postgresql.org>
> Subject: Re: [BUGS] BUG #3695: Pgsql does not report non existing function
>
>> "Roger" <ramoloney@hotmail.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
>>
> 

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic