我的函数接受一个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