Philip Warner <pjw@rhyme.com.au> writes:
> Can anyone suggest why this might be happening (I think it's in 7.1b4):
Can't duplicate in current sources:
regression=# SELECT definition as viewdef,
regression-# (select oid from pg_rewrite where
regression(# rulename='_RETstreet') as view_oid
regression-# from pg_views where viewname = 'street'; viewdef
|view_oid
-------------------------------------------------------------------------------------------------+----------SELECT
r.name,r.thepath, c.cname FROM ONLY road r, real_city c WHERE (c.outline ## r.thepath); | 4001276
(1 row)
regression=# SELECT definition as viewdef,
regression-# (select oid from pg_rewrite where
regression(# rulename='_RET' || 'street') as view_oid
regression-# from pg_views where viewname = 'street'; viewdef
|view_oid
-------------------------------------------------------------------------------------------------+----------SELECT
r.name,r.thepath, c.cname FROM ONLY road r, real_city c WHERE (c.outline ## r.thepath); | 4001276
(1 row)
What does EXPLAIN show for your two queries? (Maybe you'd better make
it EXPLAIN VERBOSE.)
regards, tom lane