Bogo
Bogo

Reputation: 688

How to execute this query without imploding my array?

Can I execute a query like this? If not, can you give me a better way to do it without walking through my array or imploding it.

    ....
    DECLARE
     examples example[];
     myinput myinput[];
    BEGIN
     select array(select e from mytable e where row_id in (myinput)) into examples
...

Upvotes: 2

Views: 170

Answers (1)

Quassnoi
Quassnoi

Reputation: 425411

SELECT  e
FROM    mytable e
WHERE   row_id = ANY(myinput)

Upvotes: 4

Related Questions