开发者

How to send table to function as argument? [duplicate]

This question already has an answer here: Table as an argument of a PostgreSQL function (1 answer) Closed 1 year ago.

How to send a table to function as argument?

Need something like that:

CREATE OR REPLACE FUNCTION test(argTable TABLE(
        field1开发者_开发知识库 integer,
        field1 integer,
        etc smallint
))
    RETURNS integer AS
$BODY$

... Is it possible btw?

UPD: I'm going to send a temp table to function so I suppose I need table structure declaration in arguments list.


You could use EXECUTE which allows the execution of an arbitrary string.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜