Received: from maia.hub.org (unknown [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id D7B881337B6D for ; Mon, 25 Oct 2010 07:20:23 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 71889-04 for ; Mon, 25 Oct 2010 10:20:11 +0000 (UTC) X-Greylist: delayed 00:05:43.859537 by SQLgrey-1.7.6 Received: from mailout4.lrau.net (mailout4.lrau.net [91.216.35.73]) by mail.postgresql.org (Postfix) with ESMTP id 1105C1337B39 for ; Mon, 25 Oct 2010 07:20:10 -0300 (ADT) Received: from [91.216.35.74] (helo=imap.lrau.net) by mailout4.lrau.net with esmtp (Exim 4.72 (FreeBSD)) (envelope-from ) id 1PAK4Q-000KIl-7a for pgsql-sql@postgresql.org; Mon, 25 Oct 2010 10:14:26 +0000 Received: from axel.rau@chaos1.de by imap.lrau.net (Archiveopteryx 3.1.3) with esmtpsa id 1288001664-39741-39740/7/31; Mon, 25 Oct 2010 10:14:24 +0000 Message-Id: From: Axel Rau To: pgsql-sql@postgresql.org Content-Type: text/plain; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v936) Subject: Using PL/pgSQL text argument in 'IN (INT,INT,...)' clause Date: Mon, 25 Oct 2010 12:14:22 +0200 X-Mailer: Apple Mail (2.936) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201010/68 X-Sequence-Number: 34719 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 =3D y WHERE id IN ( blah ); or need I revert to dynamic SQL (EXECUTE...) ? Thanks, Axel =2D-- axel.rau@chaos1.de PGP-Key:29E99DD6 +49 151 2300 9283 computing @ =20 chaos claudius