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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

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



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





Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group