RE: Postgres turns LEFT JOIN into INNER JOIN - incorrect results

Поиск
Список
Период
Сортировка
От Floris Van Nee
Тема RE: Postgres turns LEFT JOIN into INNER JOIN - incorrect results
Дата
Msg-id 928a013baac445b2b280d6ab3ad78fa5@opammb0562.comp.optiver.com
обсуждение исходный текст
Ответ на Postgres turns LEFT JOIN into INNER JOIN - incorrect results  (Floris Van Nee <florisvannee@Optiver.com>)
Список pgsql-bugs
> It works correctly if you rename the column name to anything other than _a :
> 
>    CREATE OR REPLACE FUNCTION test_internal(_a text)
>   RETURNS TABLE(a text)                      -- <- different than _a
>    LANGUAGE sql


> It also works if you rename the parameter (_a) here with something else.

Ah, of course! Sorry for the confusion.. The return column shadows the parameter in the outer function...
Thanks for the explanation! No bug, just accidentally naming the returned column wrong.

-Floris


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

Предыдущее
От: Floris Van Nee
Дата:
Сообщение: Postgres turns LEFT JOIN into INNER JOIN - incorrect results
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Postgres turns LEFT JOIN into INNER JOIN - incorrect results