Bug with view definition?

From: Sebastian Böck <sebastianboeck(at)freenet(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Bug with view definition?
Date: 2005-06-08 15:28:21
Message-ID: 42A70E95.5000505@freenet.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello all,

why is the last definition of a view not working, although the
documentation says all three are equal?

Testcase:

CREATE SCHEMA one;
CREATE SCHEMA two;

CREATE TABLE one.one (
id SERIAL PRIMARY KEY
);

CREATE TABLE two.two (
id SERIAL PRIMARY KEY
);

CREATE TABLE join1 (
id SERIAL PRIMARY KEY
);

CREATE OR REPLACE VIEW working AS
SELECT one.*
FROM one.one
JOIN two.two ON TRUE
JOIN join1 ON join1.id = one.id;

CREATE OR REPLACE VIEW also_working AS
SELECT one.*
FROM one.one
CROSS JOIN two.two
JOIN join1 ON join1.id = one.id;

CREATE OR REPLACE VIEW not_working AS
SELECT one.*
FROM one.one, two.two
JOIN join1 ON join1.id = one.id;

Thanks in advance

Sebastian

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dan Black 2005-06-08 15:40:57 Foreign keys and slow insert
Previous Message Marco Colombo 2005-06-08 15:21:55 Re: vulnerability/SSL