Pavel Stehule wrote: > 2009/10/22 Heikki Linnakangas <heikki.linnakan...@enterprisedb.com>: >> That example I ran on CVS HEAD, but it's a generic problem on all versions. > postgres=# select version(); > version > ──────────────────────────────────────────────────────────────────────────────────── > PostgreSQL 8.5devel on i686-pc-linux-gnu, compiled by GCC gcc (GCC) > 4.4.1 20090725 > (1 row) > > postgres=# select * from x; > a │ b > ────┼──── > 10 │ 20 > (1 row) > > postgres=# create view v as select * from x where b <> 20; ^^^^^^^ This is the expression that needs to be expensive. Then the exposing function needs to be cheap. That makes the planner run the exposing function first.
-- Richard Huxton Archonet Ltd -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers