From: Shigeru Hanada Date: Mon, 8 Nov 2010 00:33:06 +0000 (+0900) Subject: Fix postgresql_fdw to avoid unnecessary call of GetForeignTable(). X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=05d3e70f31e6a67a2497385713b873e538b4494f;p=users%2Fhanada%2Fpostgres.git Fix postgresql_fdw to avoid unnecessary call of GetForeignTable(). --- diff --git a/contrib/postgresql_fdw/postgresql_fdw.c b/contrib/postgresql_fdw/postgresql_fdw.c index 77ede71be1..abeb271126 100644 --- a/contrib/postgresql_fdw/postgresql_fdw.c +++ b/contrib/postgresql_fdw/postgresql_fdw.c @@ -294,7 +294,7 @@ deparseSql(ForeignScanState *scanstate) StringInfoData sql; ForeignScan *scan; RangeTblEntry *rte; - ForeignTable *table; + ForeignTable *table = scanstate->table; char *nspname = NULL; char *relname = NULL; const char *nspname_q; @@ -382,7 +382,6 @@ deparseSql(ForeignScanState *scanstate) * them in the foreign query. Otherwise, use local catalog names. * Each identifier must be quoted if they are case sensitive. */ - table = GetForeignTable(rte->relid); foreach(lc, table->options) { DefElem *opt = lfirst(lc);