InsertPgAttributeTuple() and attcacheoff - Mailing list pgsql-hackers

From Peter Eisentraut
Subject InsertPgAttributeTuple() and attcacheoff
Date
Msg-id f3bb4713-1207-24a5-b89f-5d18f774c4ed@2ndquadrant.com
Whole thread Raw
Responses Re: InsertPgAttributeTuple() and attcacheoff
List pgsql-hackers
It seems to me that it would make sense if InsertPgAttributeTuple() were
to set attcacheoff to -1 instead of taking it from the caller.

InsertPgAttributeTuple() is the interface between in-memory tuple
descriptors and on-disk pg_attribute, so it makes sense to give it the
job of resetting attcacheoff.  This avoids having all the callers having
to do so.  There are also pending patches that have to work around this
in seemingly unnecessary ways.

(The comment about the "very grotty code" that I'm removing is from a
time when AppendAttributeTuples() would deform a tuple, reset
attcacheoff, then reform the tuple -- hence grotty.  This is long
obsolete, since the tuple is now formed later.)

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

Attachment

pgsql-hackers by date:

Previous
From: Andrew Gierth
Date:
Subject: Re: Undocumented(?) limits on regexp functions
Next
From: Peter Eisentraut
Date:
Subject: Re: Memory leak with CALL to Procedure with COMMIT.