2011/9/1 Jairo <[email protected]>: > > A questão é como passar/tratar mais de um id nesta função acima para ser > feito com select in: > >
Você não informou a versão do servidor. Se for maior ou igual a 8.4, pode utilizar funções variadic [1]. Exemplo CREATE OR REPLACE FUNCTION pkg_teste(refcursor,variadic integer []) RETURNS refcursor AS $BODY$ BEGIN OPEN $1 FOR SELECT * from tb_teste where id_teste = ANY($2); RETURN $1; END; $BODY$ LANGUAGE 'plpgsql' VOLATILE [1] http://www.postgresql.org/docs/8.4/static/xfunc-sql.html#XFUNC-SQL-VARIADIC-FUNCTIONS _______________________________________________ pgbr-geral mailing list [email protected] https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
