Neil Conway <[EMAIL PROTECTED]> writes:
> On Thu, 2006-01-12 at 10:40 -0500, Tom Lane wrote:
>> If you're finding yourself writing a large and invasive patch, I think
>> you're doing it wrong.

> I think I might be :-)

Yipes ... this seems far more invasive than I think is justified.
In particular the notion of storing *every* tupdesc in TopMemoryContext
seems completely wrong.  That's not working with the context system,
that's working against it.

What I had in mind was an optional refcounting facility, whereas you
seem to be going in the direction of making it mandatory.  The reason
I think it should be optional is that most uses of tupdescs just don't
need it.  We have a grand total of one place where a refcount (or forced
local copy) seems demonstrably necessary.  Surely changing a whole lot
of code to accommodate that one place is not the right tradeoff.

My inclination at this point is to forget the whole thing and just patch
the callers of lookup_rowtype_tupdesc that need to copy the tupdesc.

                        regards, tom lane

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


Reply via email to