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

Re: View refuses to work after system reboot

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jake Newren" <jake_newren(at)yahoo(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: View refuses to work after system reboot
Date: 2001-02-12 17:05:56
Message-ID: 18926.981997556@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
"Jake Newren" <jake_newren(at)yahoo(dot)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

In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2001-02-12 17:55:52
Subject: Re: Table name scope (was Re: Outer joins aren't working with views)
Previous:From: Tom LaneDate: 2001-02-12 16:52:07
Subject: Re: SELECT with regular pattern '~' delivers wrong output

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