Hi,

On 20.1.2015 12:23, Ali Akbar wrote:
> 2015-01-20 18:17 GMT+07:00 Ali Akbar <the.ap...@gmail.com
>
> Sorry, there is another comment of makeMdArrayResult, i suggest also
> changing it like this:
> @@ -4738,6 +4764,12 @@ makeArrayResult(ArrayBuildState *astate,
>   * beware: no check that specified dimensions match the number of values
>   * accumulated.
>   *
> + * beware: if the astate was not initialized within a separate memory
> + * context (i.e. using subcontext=true when calling initArrayResult),
> + * using release=true is illegal as it releases the whole context,
> + * and that may include other memory still used elsewhere (instead use
> + * release=false and release the memory with the parent context later)
> + *
>   *astate is working state (must not be NULL)
>   *rcontext is where to construct result

I think both comment fixes are appropriate. I'll wait a bit and then
post an updated version of the patch (unless it gets commited with the
comment fixes before that).

-- 
Tomas Vondra                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to