Postgres analogue to CROSS APPLY in SQL Server

前端 未结 4 1941
梦谈多话
梦谈多话 2020-11-27 21:53

I need to migrate SQL queries written for MS SQL Server 2005 to Postgres 9.1.
What is the best way to substitute for CROSS APPLY in this query?

<         


        
4条回答
  •  情话喂你
    2020-11-27 21:58

    This link appears to show how to do it in Postgres 9.0+:

    PostgreSQL: parameterizing a recursive CTE

    It's further down the page in the section titled "Emulating CROSS APPLY with set-returning functions". Please be sure to note the list of limitations after the example.

提交回复
热议问题