Re: GiST: memory allocation, cleanup - Mailing list pgsql-patches

From Neil Conway
Subject Re: GiST: memory allocation, cleanup
Date
Msg-id 418E0635.1040301@samurai.com
Whole thread Raw
In response to Re: GiST: memory allocation, cleanup  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: GiST: memory allocation, cleanup  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Tom Lane wrote:
> I think you can assume that noplace else in the backend will invoke the
> sk_func, period.

Great, thanks for the info.

>>- mark the array that indicates NULLs that is passed to
>>index_formtuple() as 'const', and fix the resulting fallout
>
> I'm a bit dubious about this, mainly because you did not likewise
> const-ify the other input arguments; it seems confusing to do a partial
> const-ification.

Well, "partial const-ification" is the rule rather than the exception in
the backend right now. I'll take a look at adding more const qualifiers,
but I don't really see why "partial const-ification" is confusing.

> The only thing I don't like about this is that it's not apparent that
> the function would close the heap & index relations, so the calling code
> will now look like it's leaking the relation references.  Maybe call it
> IndexCloseAndUpdateStats or something like that?

Good point -- I'll make that change.

-Neil

pgsql-patches by date:

Previous
From: Thomas Hallgren
Date:
Subject: Re: pgxs under Win32 for PL/Java
Next
From: "Magnus Hagander"
Date:
Subject: Re: pgxs under Win32 for PL/Java