Re: psql 7.3.4 disagrees with NATURAL CROSS JOIN

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: psql 7.3.4 disagrees with NATURAL CROSS JOIN
Дата
Msg-id 27883.1083899335@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: psql 7.3.4 disagrees with NATURAL CROSS JOIN  (Jonathan Scott <jwscott@vanten.com>)
Список pgsql-hackers
Jonathan Scott <jwscott@vanten.com> writes:
> I have included a pg_dump of the schema that causes this problem. If
> you take out the word "CROSS" from my source files, it should load
> just fine. If you then pg_dump it, in there you should find "CROSS".

Indeed, I had just come to the conclusion that this test in ruleutils.c
is bogus:
               case JOIN_INNER:                   if (j->quals)                       appendContextKeyword(context,
"NATURALJOIN ",                                            -PRETTYINDENT_JOIN,
 PRETTYINDENT_JOIN, 0);                   else                       appendContextKeyword(context, "NATURAL CROSS JOIN
",                                           -PRETTYINDENT_JOIN,
PRETTYINDENT_JOIN,0);                   break;
 

and that it should just print NATURAL JOIN either way.  The code looks
significantly different in older versions, but the fundamental bug has
been there since the OUTER JOIN support was first committed nearly four
years ago.  You get some kind of gold star for being the first to find
it ...
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jonathan Scott
Дата:
Сообщение: Re: psql 7.3.4 disagrees with NATURAL CROSS JOIN
Следующее
От: Rod Taylor
Дата:
Сообщение: Re: ALTER TABLE TODO items