BUG #7653: Minor problem with join condition

From: stefano(at)sportilia(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #7653: Minor problem with join condition
Date: 2012-11-12 10:14:49
Message-ID: E1TXr2X-000080-UB@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 7653
Logged by: Stefano Baccianella
Email address: stefano(at)sportilia(dot)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 = t2.t1id JOIN
table3 t3 ON t1.id = 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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2012-11-12 14:30:03 Re: BUG #7653: Minor problem with join condition
Previous Message Bernhard Reutner-Fischer 2012-11-12 09:14:03 Re: BUG #7644: Missing implicit types of Result and failing type-conversion