April 24th, 2013, 09:34 AM
I am rewriting some SQL Server SPs into PostgreSQL functions one of them uses a CROSS APPLY in a SP similar to this:
CROSS APPLY fn_whatever(t.col3, t.col4) AS ca
I have wrote and tested the function fn_whatever which works ok but I cannot work out how to use.
fn_whatever(t.col3, t.col4) AS ca
But the last line gives a syntax error
Please help if you can
April 25th, 2013, 11:05 AM
This is the answer I got on another forum in case anyone else ends up asking the same question:
This is currently not possible.
Postgres 9.3 will be able to use LATERAL for this (which is the ANSI standard compliant implementation of SQL Server's cross apply).