projects
/
users
/
hanada
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
05d3e70
)
Fix postgresql_fdw to reuse contents of tuplestore through whole of
author
Shigeru Hanada
<
[email protected]
>
Mon, 8 Nov 2010 01:58:55 +0000
(10:58 +0900)
committer
Shigeru Hanada
<
[email protected]
>
Mon, 8 Nov 2010 01:58:55 +0000
(10:58 +0900)
the query to avoid unnecessary re-execution of remote query.
contrib/postgresql_fdw/postgresql_fdw.c
patch
|
blob
|
blame
|
history
diff --git
a/contrib/postgresql_fdw/postgresql_fdw.c
b/contrib/postgresql_fdw/postgresql_fdw.c
index abeb2711260c0ec144276ba642da379b2d1207dd..288830430b4df16305e97cc2fcca38202dbb5f01 100644
(file)
--- a/
contrib/postgresql_fdw/postgresql_fdw.c
+++ b/
contrib/postgresql_fdw/postgresql_fdw.c
@@
-649,13
+649,9
@@
pgReOpen(ForeignScanState *scanstate)
{
pgFdwReply *reply = (pgFdwReply *) scanstate->reply;
- /* Free Tuplestore to execute query again */
- /* TODO: reuse tupstore through the scan to avoid overhead */
+ /* Rewind tuplestore to retrieve all tuples again */
if (reply->tupstore)
- {
- tuplestore_end(reply->tupstore);
- reply->tupstore = NULL;
- }
+ tuplestore_rescan(reply->tupstore);
}
/*