| From: | Raymond O'Donnell <rod(at)iol(dot)ie> | 
|---|---|
| To: | 张海峰 <roxetter(at)gmail(dot)com> | 
| Cc: | pgsql-general(at)postgresql(dot)org | 
| Subject: | Re: Function nesting issue | 
| Date: | 2010-01-28 09:41:24 | 
| Message-ID: | 4B615BC4.9010708@iol.ie | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
On 28/01/2010 07:32, 张海峰 wrote:
> i have 2 functions, naming a and b, both outputing a resultset(cursor)
> and a integer.
> a calls b
> 
> a:
> CREATE OR REPLACE FUNCTION "public"."t_outer" (out o_rs
> "pg_catalog"."refcursor", out o_i integer) RETURNS record AS
> ...
> select t_inner(o_rs, o_i);
> ...
> 
> b:
> CREATE OR REPLACE FUNCTION "public"."t_inner" (out o_rs
> "pg_catalog"."refcursor", out o_i integer) RETURNS record AS
> ...
> 
> Compilation is ok, but when i call a, it says:
> ERROR: function b(refcursor, integer) does not exist
> No function matches the given name and argument types. You might need
> to add explicit type casts.
Can you post the query that calls the outer function? In the above,
you've named your functions t_outer() and t_inner(); so if you're trying
to call a function named b(), then naturally you'll get an error.
BTW, if your function names are all lower-case, you don't need all the
double-quotes.
Ray.
-- 
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tamanna | 2010-01-28 11:58:05 | Re: logtrigger/denyaccess triggers removed from master/slave | 
| Previous Message | Alban Hertroys | 2010-01-28 08:43:41 | Re: Primary Key Increment Doesn't Seem Correct Under Table Partition |