Re: View refuses to work after system reboot - Mailing list pgsql-bugs

From Tom Lane
Subject Re: View refuses to work after system reboot
Date
Msg-id 18926.981997556@sss.pgh.pa.us
Whole thread Raw
In response to View refuses to work after system reboot  ("Jake Newren" <jake_newren@yahoo.com>)
List pgsql-bugs
"Jake Newren" <jake_newren@yahoo.com> writes:
>     PostgreSQL 7.0.3 installed in the /usr/local/pgsql directory.

>     I created a view on my database with the following statement:
> CREATE VIEW wireticket_out AS SELECT wire_tickets.fund_cusip,
> funds.fund_desc, accounts.acct_name, wire_tickets.acct_num,
> wire_tickets.cash_actual, wire_tickets.cash_invest,
> wire_tickets.date_entered FROM wire_tickets INNER JOIN accounts ON
> wire_tickets.acct_num = accounts.acct_num INNER JOIN funds ON
> wire_tickets.fund_cusip = funds.fund_cusip

IIRC, 7.0.* has some rather nasty bugs with nested JOIN clauses, such as
you have here.  It'd be safer to express the query with a simple "FROM
wire_tickets, accounts, funds" and put the join conditions in WHERE.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: SELECT with regular pattern '~' delivers wrong output
Next
From: Tom Lane
Date:
Subject: Re: Table name scope (was Re: Outer joins aren't working with views)