Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TXr2a-0005uX-M8 for pgsql-bugs@postgresql.org; Mon, 12 Nov 2012 10:14:52 +0000 Received: from mahout.postgresql.org ([98.129.198.123]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TXr2Z-0006Ui-Ac for pgsql-bugs@postgresql.org; Mon, 12 Nov 2012 10:14:51 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TXr2Y-0006vh-C1 for pgsql-bugs@postgresql.org; Mon, 12 Nov 2012 10:14:50 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1TXr2X-000080-UB for pgsql-bugs@postgresql.org; Mon, 12 Nov 2012 10:14:49 +0000 Date: Mon, 12 Nov 2012 10:14:49 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #7653: Minor problem with join condition To: pgsql-bugs@postgresql.org From: stefano@sportilia.com X-Pg-Spam-Score: -2.1 (--) X-Archive-Number: 201211/55 X-Sequence-Number: 34613 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