Re: 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: Re: Using PL/pgSQL text argument in 'IN (INT,INT,...)' clause [re-post]
Date: 2010-10-25 19:01:40
Message-ID: C49DCFF7-7D7C-4720-B5E8-1F9DDD431764@chaos1.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Thanks Richard and Sergey,

your solution works perfect, even if blah contains only one member.

Am 25.10.2010 um 18:17 schrieb Richard Broersma:
>
> Here is what I think should work:
>
> UPDATE foo
> Set x = y
> WHERE id = ANY( CAST( string_to_array( '1,2,3,4', ',' ) AS
> INTEGER[] ));

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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message venkat 2010-10-26 07:07:44 How to update multiple rows
Previous Message Sergey Konoplev 2010-10-25 16:17:55 Re: Using PL/pgSQL text argument in 'IN (INT, INT, ...)' clause [re-post]