Search Postgresql Archives

Bug with view definition?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

              http://www.postgresql.org/docs/faq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux