On Mon, Oct 25, 2010 at 9:07 AM, Axel Rau <axel....@chaos1.de> wrote:
> 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 ); 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[] )); -- Regards, Richard Broersma Jr. Visit the Los Angeles PostgreSQL Users Group (LAPUG) http://pugs.postgresql.org/lapug -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql