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/include/parser | |
| parent | 45c79a3094a246e94ed6725c7ade0a61bd3fe56a (diff) | |
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/include/parser')
| -rw-r--r-- | src/include/parser/parse_relation.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/parser/parse_relation.h b/src/include/parser/parse_relation.h index 2af4fbed333..6d1d9232820 100644 --- a/src/include/parser/parse_relation.h +++ b/src/include/parser/parse_relation.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/parser/parse_relation.h,v 1.48 2004/12/31 22:03:38 pgsql Exp $ + * $PostgreSQL: pgsql/src/include/parser/parse_relation.h,v 1.49 2005/04/13 16:50:55 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -45,7 +45,7 @@ extern RangeTblEntry *addRangeTableEntry(ParseState *pstate, bool inh, bool inFromCl); extern RangeTblEntry *addRangeTableEntryForRelation(ParseState *pstate, - Oid relid, + Relation rel, Alias *alias, bool inh, bool inFromCl); |
