Re: troubleshooting pointers - Mailing list pgsql-hackers

From Joe Conway
Subject Re: troubleshooting pointers
Date
Msg-id 3CDADCF9.1000704@joeconway.com
Whole thread Raw
In response to troubleshooting pointers  (Joe Conway <mail@joeconway.com>)
List pgsql-hackers
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




pgsql-hackers by date:

Previous
From: "Iavor Raytchev"
Date:
Subject: www.pgaccess.org - the official story (the way I saw it)
Next
From: Jan Wieck
Date:
Subject: Re: the parsing of parameters