]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
NATURAL CROSS JOIN is a contradiction in terms, not to mention disallowed
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 7 May 2004 03:20:01 +0000 (03:20 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 7 May 2004 03:20:01 +0000 (03:20 +0000)
by the SQL spec and by our parser.  Thanks to Jonathan Scott for finding
this longstanding error.

src/backend/utils/adt/ruleutils.c

index d3269e11067b731397a4446a1cc45cf210e733da..ce072990ad233b55009f5452fd30aac4877a9560 100644 (file)
@@ -3,7 +3,7 @@
  *                             back to source text
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.157 2003/10/04 18:22:59 tgl Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.157.2.1 2004/05/07 03:20:01 tgl Exp $
  *
  *       This software is copyrighted by Jan Wieck - Hamburg.
  *
@@ -3830,14 +3830,9 @@ get_from_clause_item(Node *jtnode, Query *query, deparse_context *context)
                        switch (j->jointype)
                        {
                                case JOIN_INNER:
-                                       if (j->quals)
-                                               appendContextKeyword(context, "NATURAL JOIN ",
-                                                                                        -PRETTYINDENT_JOIN,
-                                                                                        PRETTYINDENT_JOIN, 0);
-                                       else
-                                               appendContextKeyword(context, "NATURAL CROSS JOIN ",
-                                                                                        -PRETTYINDENT_JOIN,
-                                                                                        PRETTYINDENT_JOIN, 0);
+                                       appendContextKeyword(context, "NATURAL JOIN ",
+                                                                                -PRETTYINDENT_JOIN,
+                                                                                PRETTYINDENT_JOIN, 0);
                                        break;
                                case JOIN_LEFT:
                                        appendContextKeyword(context, "NATURAL LEFT JOIN ",