BUG #7653: Minor problem with join condition - Mailing list pgsql-bugs

From stefano@sportilia.com
Subject BUG #7653: Minor problem with join condition
Date
Msg-id E1TXr2X-000080-UB@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #7653: Minor problem with join condition
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      7653
Logged by:          Stefano Baccianella
Email address:      stefano@sportilia.com
PostgreSQL version: 9.2.1
Operating system:   Linux CentOS
Description:        =


Don't know if this is a bug or a correct behaviour, but in a query like
this:

SELECT t1.* FROM
table1 t1 JOIN
table2 t2 ON t1.id =3D t2.t1id JOIN
table3 t3 ON t1.id =3D t2.t1id

The parser should return an error because we are joining a table without
using any of its column.

I know this is a minor issue and a correct SQL syntax, but logically a JOIN
without condition is a Cartesian product between the two tables and not a
JOIN.
My proposal is to raise an error when a join condition doesn't contains the
table reference.

Regards

pgsql-bugs by date:

Previous
From: Bernhard Reutner-Fischer
Date:
Subject: Re: BUG #7644: Missing implicit types of Result and failing type-conversion
Next
From: Tom Lane
Date:
Subject: Re: BUG #7653: Minor problem with join condition