Skip to content

Commit 573aaa5

Browse files
committed
NATURAL CROSS JOIN is a contradiction in terms, not to mention disallowed
by the SQL spec and by our parser. Thanks to Jonathan Scott for finding this longstanding error.
1 parent 97c7cb0 commit 573aaa5

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/backend/utils/adt/ruleutils.c

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* back to source text
44
*
55
* IDENTIFICATION
6-
* $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.164 2004/05/05 04:48:46 tgl Exp $
6+
* $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.165 2004/05/07 03:19:44 tgl Exp $
77
*
88
* This software is copyrighted by Jan Wieck - Hamburg.
99
*
@@ -3788,14 +3788,9 @@ get_from_clause_item(Node *jtnode, Query *query, deparse_context *context)
37883788
switch (j->jointype)
37893789
{
37903790
case JOIN_INNER:
3791-
if (j->quals)
3792-
appendContextKeyword(context, "NATURAL JOIN ",
3793-
-PRETTYINDENT_JOIN,
3794-
PRETTYINDENT_JOIN, 0);
3795-
else
3796-
appendContextKeyword(context, "NATURAL CROSS JOIN ",
3797-
-PRETTYINDENT_JOIN,
3798-
PRETTYINDENT_JOIN, 0);
3791+
appendContextKeyword(context, "NATURAL JOIN ",
3792+
-PRETTYINDENT_JOIN,
3793+
PRETTYINDENT_JOIN, 0);
37993794
break;
38003795
case JOIN_LEFT:
38013796
appendContextKeyword(context, "NATURAL LEFT JOIN ",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy