Re: View refuses to work after system reboot
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: "Jake Newren" <jake_newren@yahoo.com>
Cc: pgsql-bugs@postgresql.org
Date: 2001-02-12T17:05:56Z
Lists: 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