From: John C. Frickson <john@frickson.us>
To: pgsql-odbc@postgresql.org
Subject: Re: Query buffer allocate error in copy_statement_with_parameters
Date: Thu, 22 May 2014 22:53:19 -0500
Message-ID: <1400817199.4050.5.camel@server.frickson.pvt> (raw)
In-Reply-To: <1400781319.3209.15.camel@server.frickson.pvt>
References: <1400781319.3209.15.camel@server.frickson.pvt>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: john@frickson.us
Subject: Re: Query buffer allocate error in copy_statement_with_parameters
In-Reply-To: <1400817199.4050.5.camel@server.frickson.pvt>
References: <1400781319.3209.15.camel@server.frickson.pvt> <1400817199.4050.5.camel@server.frickson.pvt>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox