小编Bei*_*eig的帖子

调用函数,其中参数是(子)选择语句

我的函数接受一个int4作为参数并返回一个表:

SELECT * FROM test_function(545421); -- works fine

SELECT * FROM test_function(SELECT customerid
                            FROM tableX where id = 1); -- syntax error
Run Code Online (Sandbox Code Playgroud)

我怎样才能使这项工作?
服务器 PostgreSQL 9.3.1

postgresql subquery set-returning-functions

10
推荐指数
1
解决办法
2万
查看次数