开发者

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

开发者 https://www.devze.com 2023-01-16 16:25 出处:网络
This question already has an answer here: Table as an argument of a PostgreSQL function (1 answer) Closed 1 year ago.
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

精彩评论

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