Using PL/pgSQL text argument in 'IN (INT,INT,...)' clause [re-post]

From: Axel Rau <Axel(dot)Rau(at)Chaos1(dot)DE>
To: pgsql-sql(at)postgresql(dot)org
Subject: Using PL/pgSQL text argument in 'IN (INT,INT,...)' clause [re-post]
Date: 2010-10-25 16:07:51
Message-ID: 29C206C6-7272-4B12-963D-8593020FB30E@Chaos1.DE
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Good morning,

I have a function argument blah of type text containing something like
33,44,55,66
. Can I cast it in some way to use it in an IN clause as integers like
UPDATE foo SET x = y WHERE id IN ( blah );
or need I revert to dynamic SQL (EXECUTE...) ?

Thanks, Axel
---
axel(dot)rau(at)chaos1(dot)de PGP-Key:29E99DD6 +49 151 2300 9283 computing @
chaos claudius

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Broersma 2010-10-25 16:17:01 Re: Using PL/pgSQL text argument in 'IN (INT, INT, ...)' clause [re-post]
Previous Message Harald Fuchs 2010-10-25 13:13:51 Re: How to search for a part of a number