Change addRangeTableEntryForRelation() to take a Relation pointer instead

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 2fdf9e0be6b474e38e516007b5ac5274ecef514d
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2005-04-13T16:50:55Z
Releases: 8.1.0
Change addRangeTableEntryForRelation() to take a Relation pointer instead
of just a relation OID, thereby not having to open the relation for itself.
This actually saves code rather than adding it for most of the existing
callers, which had the rel open already.  The main point though is to be
able to use this rather than plain addRangeTableEntry in setTargetTable,
thus saving one relation_openrv/relation_close cycle for every INSERT,
UPDATE, or DELETE.  Seems to provide a several percent win on simple
INSERTs.

Files