Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VA12q-0004CS-Et for pgsql-odbc@arkaria.postgresql.org; Thu, 15 Aug 2013 17:09:08 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VA12p-0000G3-UZ for pgsql-odbc@arkaria.postgresql.org; Thu, 15 Aug 2013 17:09:07 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VA12p-0000Fx-D3 for pgsql-odbc@postgresql.org; Thu, 15 Aug 2013 17:09:07 +0000 Received: from smtp-outbound-2.vmware.com ([208.91.2.13]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VA12i-0001Jg-JN for pgsql-odbc@postgresql.org; Thu, 15 Aug 2013 17:09:05 +0000 Received: from sc9-mailhost3.vmware.com (sc9-mailhost3.vmware.com [10.113.161.73]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 6684E2A0A2; Thu, 15 Aug 2013 10:08:58 -0700 (PDT) Received: from zcs-prod-ext-mta-2.vmware.com (zcs-prod-ext-mta-2.vmware.com [10.113.62.224]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id 651AE4034A; Thu, 15 Aug 2013 10:08:58 -0700 (PDT) Received: from zcs-prod-ext-mta-2.vmware.com (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-2.vmware.com (Postfix) with ESMTP id 7751BC004C; Thu, 15 Aug 2013 10:09:03 -0700 (PDT) Received: from [192.168.1.90] (zimbra-prod-ext-proxy-vip.vmware.com [10.113.63.87]) by zcs-prod-ext-mta-2.vmware.com (Postfix) with ESMTPSA; Thu, 15 Aug 2013 10:09:02 -0700 (PDT) Message-ID: <520D0B27.1010504@vmware.com> Date: Thu, 15 Aug 2013 20:08:55 +0300 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: Andrei Gheorghe CC: "pgsql-odbc@postgresql.org" Subject: Re: Calling a stored procedure with an array parameter References: <1376382777.41649.YahooMailNeo@web162401.mail.bf1.yahoo.com> In-Reply-To: <1376382777.41649.YahooMailNeo@web162401.mail.bf1.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -7.0 (-------) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org On 13.08.2013 11:32, Andrei Gheorghe wrote: > Hello > > I would like to know if I can use the postgres ODBC driver to call a stored procedure with an array parameter. I've managed to do it by binding the parameter as SQL_CHAR with a value like { value1, value 2 }but I would like to know if there's another more efficient way. There's no straightforward way to create an array value in the client and send it as a query parameter. You could call it with something this though: SELECT my_stored_procedure(ARRAY[?,?,?,?]); Fill in the parameters with the individual values, and the server will construct the array from them. - Heikki -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc