Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WngXy-00048k-An for pgsql-odbc@arkaria.postgresql.org; Fri, 23 May 2014 03:53:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WngXx-0002VD-2h for pgsql-odbc@arkaria.postgresql.org; Fri, 23 May 2014 03:53:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1WngXw-0002T7-3s for pgsql-odbc@postgresql.org; Fri, 23 May 2014 03:53:28 +0000 Received: from 173-11-38-134-minnesota.hfc.comcastbusiness.net ([173.11.38.134] helo=johnspc.frickson.pvt) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1WngXr-0003Ct-62 for pgsql-odbc@postgresql.org; Fri, 23 May 2014 03:53:26 +0000 Received: from [173.11.38.132] (173-11-38-132-Minnesota.hfc.comcastbusiness.net [173.11.38.132]) by johnspc.frickson.pvt (Postfix) with ESMTP id 2BC922860C6D for ; Thu, 22 May 2014 22:53:20 -0500 (CDT) Message-ID: <1400817199.4050.5.camel@server.frickson.pvt> Subject: Re: Query buffer allocate error in copy_statement_with_parameters From: "John C. Frickson" To: pgsql-odbc@postgresql.org Date: Thu, 22 May 2014 22:53:19 -0500 In-Reply-To: <1400781319.3209.15.camel@server.frickson.pvt> References: <1400781319.3209.15.camel@server.frickson.pvt> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -0.9 (/) 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 I have a little more info. I suspected having a 8.3 version of the ODBC driver was (part of) the problem. So I tested a short program on Windows, where I have a 09.02.01 driver. It worked fine there. Since I couldn't find a 9.2 binary version of ODBC, I downloaded the source, built, and installed. Still getting the error. Anybody have any ideas? On Thu, 2014-05-22 at 12:55 -0500, John C. Frickson wrote: > I'm getting the error message "Query buffer allocate error in > copy_statement_with_parameters" when calling a function with a > parameter. > > The very simple function was created like this: > > CREATE OR REPLACE FUNCTION pvsystem.spclearloginfails > (_seconds integer) > RETURNS void AS $$ > BEGIN > DELETE FROM LoginFails WHERE extract(epoch FROM NOW()) - > extract(epoch FROM LastFail) > _seconds; > END; > $$ > LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT > SECURITY DEFINER COST 100; > > Calling SQLPrepare() works fine. Calling SQLDescribeParam() works fine. > Calling SQLBindParameter() works fine. > SQLExecute returns the above error. > > The data buffer for the parameter is 10 bytes long. The contents are > "300" followed by nulls. length_or_ind is 3. > > Doesn't seem like there's very much that can go wrong here. > > The server is version 9.2.7 and the ODBC driver is version 08.03.0200. > Running on OpenSUSE 13.1. > > Thanks! > John > > > > -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc