Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 5A9CA632CCC for ; Wed, 26 Aug 2009 10:20:14 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 10521-06 for ; Wed, 26 Aug 2009 13:19:52 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ew0-f216.google.com (mail-ew0-f216.google.com [209.85.219.216]) by mail.postgresql.org (Postfix) with ESMTP id 517FB632A6B for ; Wed, 26 Aug 2009 10:20:00 -0300 (ADT) Received: by ewy12 with SMTP id 12so142675ewy.24 for ; Wed, 26 Aug 2009 06:19:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:content-type; bh=IU4k1vJBWHO/dtW4eZp0XJRXMSzKneHNrnUrKmS9Q34=; b=Idw6YzdMN7qdBqrdRBofsRzTrSPU2aMk6znoRh1lKCjcsY4njxRATy74189a5k8PwI T6wC2aLuru8amB7Z4s6o0mKNilbmWhW3dM3CTzDXelu2lFAf023gNESsPIVxplrZ/7Hu Jh9IeSPpoP1jaiSI4XaCLVqFVj5YFGeG6uamM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=TrwyuG3PwC8g57aB8pDjwNp46JeH5nGiCZq3s2t6qYs0YU9WwGVGm78TIlNMk6vi8v 0T3GvtTit67Il6KCb4K7SI3PmMapvFOgNsPErr4C690kzi28VyoBCTlWXqwaXdHBrlH+ eW2t3YZ5Dq7gVeCOLw9P/74uHouLQrjVzYaWs= MIME-Version: 1.0 Received: by 10.216.90.133 with SMTP id e5mr1519870wef.23.1251292798106; Wed, 26 Aug 2009 06:19:58 -0700 (PDT) From: Nacef LABIDI Date: Wed, 26 Aug 2009 14:19:38 +0100 Message-ID: Subject: Selecting values from comma separated string To: pgsql-sql@postgresql.org Content-Type: multipart/alternative; boundary=0016e6dab052bdc18b04720b4e9a X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.739 tagged_above=-10 required=5 tests=BAYES_20=-0.74, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200908/127 X-Sequence-Number: 33036 --0016e6dab052bdc18b04720b4e9a Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi all, I want to write a function that takes as param a comma separated values string and perform a select matching these values. Here is the string '1,3,7,8' And I wan to perform a : SELECT * FROM my_table WHERE id IN (1, 3, 7, 8); Does anyone have a clue ? Thanks Nacef --0016e6dab052bdc18b04720b4e9a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi all,

I want to write a function that takes as pa= ram a comma separated values string and perform a select matching these val= ues.

Here is the string '1,3,7,8'

And I wan to perfor= m a : SELECT * FROM my_table WHERE id IN (1, 3, 7, 8);

Does anyone have a clue ?

Thanks

Nacef
--0016e6dab052bdc18b04720b4e9a--