Sounds like a good idea. I am always in favor of more helpful errors.
The SQL standard doesn't say what should happen if you make a mistake,
so we are free to be as helpful as we can!

Since CROSS APPLY is syntactic sugar for LATERAL TABLE, we should
probably give the same messages there.

Please log a JIRA case.

Julian


On Tue, Sep 12, 2017 at 12:43 PM, Vladimir Sitnikov
<[email protected]> wrote:
>>Are you aware of CROSS APPLY?
>
> Ah thanks, it is reasonable.
>
> Just in case: "... unnest(tableFunction(..))" throws an error like
> "function tableFunction does not exist". It was extremely confusing for me.
> Technically speaking, unnest searches for regular functions, thus it
> ignores table functions. table(...) searches for table functions and
> ignores arrays.
>
> Does it make sense to perform an additional check in case of error, so the
> error message becomes "did you mean <<cross apply(tableFunction)>>?" in
> case someone uses "unnest(tablefunction)"?
>
>
> Vladimir

Reply via email to