Re: BUG #1169: Select table.oid from view seems to loop - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #1169: Select table.oid from view seems to loop
Date
Msg-id 13218.1087483258@sss.pgh.pa.us
Whole thread Raw
In response to BUG #1169: Select table.oid from view seems to loop  ("PostgreSQL Bugs List" <pgsql-bugs@postgresql.org>)
List pgsql-bugs
"PostgreSQL Bugs List" <pgsql-bugs@postgresql.org> writes:
> select table1.oid from view1;
> NOTICE:  adding missing FROM-clause entry for table "table1"
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This is an unqualified join, and will yield count(table1)*count(view1)
rows.  table1.oid is not exposed by the view and so you can't select
it from the view.  What you wrote is interpreted as
    select table1.oid from view1, table1;

> (psql crashes)

I'm not surprised psql ran out of memory, but I'd have expected a more
graceful response than "crashing".  What happened *exactly*?  On my
machine, recent psql versions just discard excess data and then complain
later.

            regards, tom lane

pgsql-bugs by date:

Previous
From: "PostgreSQL Bugs List"
Date:
Subject: BUG #1169: Select table.oid from view seems to loop
Next
From: Stephan Szabo
Date:
Subject: Re: BUG #1169: Select table.oid from view seems to loop