diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-04-13 16:50:55 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-04-13 16:50:55 +0000 |
| commit | 2fdf9e0be6b474e38e516007b5ac5274ecef514d (patch) | |
| tree | 4a5b04ca560ac8ef7e8e76c1dfd3dd840a6084dd /src/backend/commands/tablecmds.c | |
| parent | 45c79a3094a246e94ed6725c7ade0a61bd3fe56a (diff) | |
| download | postgresql-2fdf9e0be6b474e38e516007b5ac5274ecef514d.tar.gz | |
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.
Diffstat (limited to 'src/backend/commands/tablecmds.c')
| -rw-r--r-- | src/backend/commands/tablecmds.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 21655e7d61..79e36c64e7 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.152 2005/03/29 00:16:57 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.153 2005/04/13 16:50:54 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -4732,8 +4732,8 @@ ATPrepAlterColumnType(List **wqueue, /* Expression must be able to access vars of old table */ rte = addRangeTableEntryForRelation(pstate, - RelationGetRelid(rel), - makeAlias(RelationGetRelationName(rel), NIL), + rel, + NULL, false, true); addRTEtoQuery(pstate, rte, false, true); |
