Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Planner drops unreferenced tables --- bug, no?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: wieck(at)debis(dot)com (Jan Wieck)
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Planner drops unreferenced tables --- bug, no?
Date: 1999-09-29 15:04:52
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
wieck(at)debis(dot)com (Jan Wieck) writes:
>> It seems to me that the latter query must yield 9 rows (three
>> occurrences of each value) to satisfy the SQL spec.  The spec defines
>> the result of a two-query FROM clause to be the Cartesian product of the
>> two tables, period.  It doesn't say anything about "only if one or more
>> columns of each table are actually used somewhere".

>     Caution here!

>     After  rewriting  there can be many unused rangetable entries
>     floating around. Especially if you SELECT from  a  view,  the
>     view's relation is still mentioned in the rangetable.

I was thinking of forcing rangetable entries that are marked as
'inFromCl' to be included in the planner's target relation set,
but those not so marked would only get added if referenced, same as now.
Do you think that will not work?

			regards, tom lane


pgsql-hackers by date

Next:From: Christof PetigDate: 1999-09-29 15:05:34
Subject: Re: [HACKERS] Regression tests on intel for 6.5.2
Previous:From: Jan WieckDate: 1999-09-29 14:52:04
Subject: Re: [HACKERS] Planner drops unreferenced tables --- bug, no?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group