Using PL/pgSQL text argument in 'IN (INT,INT,...)' clause

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
Date: 2010-10-25 10:14:22
Message-ID: BE3606F5-FE4F-4661-B6B1-36DC10488BD6@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 Harald Fuchs 2010-10-25 13:13:51 Re: How to search for a part of a number
Previous Message Andreas 2010-10-25 00:48:34 How to search for a part of a number