RE: Postgres turns LEFT JOIN into INNER JOIN - incorrect results - Mailing list pgsql-bugs

From Floris Van Nee
Subject RE: Postgres turns LEFT JOIN into INNER JOIN - incorrect results
Date
Msg-id 928a013baac445b2b280d6ab3ad78fa5@opammb0562.comp.optiver.com
Whole thread Raw
In response to Postgres turns LEFT JOIN into INNER JOIN - incorrect results  (Floris Van Nee <florisvannee@Optiver.com>)
List 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 by date:

Previous
From: Floris Van Nee
Date:
Subject: Postgres turns LEFT JOIN into INNER JOIN - incorrect results
Next
From: Tom Lane
Date:
Subject: Re: Postgres turns LEFT JOIN into INNER JOIN - incorrect results