diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2013-02-22 09:21:50 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2013-02-22 09:21:50 -0500 |
commit | 6da378dbc97f1b96bf5778a558e168a0dc405bce (patch) | |
tree | f702a08f31aa1eb3ef421835cd109a197ec8eaa5 /contrib/postgres_fdw/sql | |
parent | 211e157a51bf94dfcc143e78221951411f87e4b2 (diff) | |
download | postgresql-6da378dbc97f1b96bf5778a558e168a0dc405bce.tar.gz postgresql-6da378dbc97f1b96bf5778a558e168a0dc405bce.zip |
Fix whole-row references in postgres_fdw.
The optimization to not retrieve unnecessary columns wasn't smart enough.
Noted by Thom Brown.
Diffstat (limited to 'contrib/postgres_fdw/sql')
-rw-r--r-- | contrib/postgres_fdw/sql/postgres_fdw.sql | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/postgres_fdw/sql/postgres_fdw.sql b/contrib/postgres_fdw/sql/postgres_fdw.sql index 0fb2b41117c..8569474694e 100644 --- a/contrib/postgres_fdw/sql/postgres_fdw.sql +++ b/contrib/postgres_fdw/sql/postgres_fdw.sql @@ -136,6 +136,9 @@ EXPLAIN (COSTS false) SELECT * FROM ft1 ORDER BY c3, c1 OFFSET 100 LIMIT 10; SELECT * FROM ft1 ORDER BY c3, c1 OFFSET 100 LIMIT 10; EXPLAIN (VERBOSE, COSTS false) SELECT * FROM ft1 t1 ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10; SELECT * FROM ft1 t1 ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10; +-- whole-row reference +EXPLAIN (VERBOSE, COSTS false) SELECT t1 FROM ft1 t1 ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10; +SELECT t1 FROM ft1 t1 ORDER BY t1.c3, t1.c1 OFFSET 100 LIMIT 10; -- empty result SELECT * FROM ft1 WHERE false; -- with WHERE clause |