Valentine Zaretsky wrote:
> just_fun=# select * from fun(1) as fun limit 1;
> WARNING:  Buffer Leak: [050] (freeNext=-3, freePrev=-3, rel=16570/16587,
> blockNum=0, flags=0x85, refcount=1 2)
>  i |  v
> ---+-----
>  1 | one
> (1 row)
> 
> ....And there is no warning with "ORDER BY"
> 
> just_fun=# select * from fun(1) as fun order by v limit 1;
>  i |  v
> ---+-----
>  1 | one
> (1 row)
> 
> 
> Hope this info maybe useful to solve the problem.

Hmm. Yes, it looks like this is probably the same or a related issue.


> 
> By the way, could you give an example of C-function returning set?
> 

In contrib/dblink, see dblink.c for a couple of examples (dblink(), 
dblink_get_pkey()), or look at pg_stat_get_backend_idset() in the 
backend code. I haven't written a C-function returning a setof composite 
type yet, but probably will soon, because I'll need it for testing (and 
ultimately for the regression test script).

Thanks for the help!

Joe



---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply via email to