pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Query buffer allocate error in copy_statement_with_parameters
3+ messages / 2 participants
[nested] [flat]

* Query buffer allocate error in copy_statement_with_parameters
@ 2014-05-22 17:55 John C. Frickson <john@frickson.us>
  2014-05-23 03:53 ` Re: Query buffer allocate error in copy_statement_with_parameters John C. Frickson <john@frickson.us>
  0 siblings, 1 reply; 3+ messages in thread

From: John C. Frickson @ 2014-05-22 17:55 UTC (permalink / raw)
  To: pgsql-odbc

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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Query buffer allocate error in copy_statement_with_parameters
  2014-05-22 17:55 Query buffer allocate error in copy_statement_with_parameters John C. Frickson <john@frickson.us>
@ 2014-05-23 03:53 ` John C. Frickson <john@frickson.us>
  2014-05-27 18:21   ` Re: Query buffer allocate error in copy_statement_with_parameters Heikki Linnakangas <hlinnakangas@vmware.com>
  0 siblings, 1 reply; 3+ messages in thread

From: John C. Frickson @ 2014-05-23 03:53 UTC (permalink / raw)
  To: pgsql-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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Query buffer allocate error in copy_statement_with_parameters
  2014-05-22 17:55 Query buffer allocate error in copy_statement_with_parameters John C. Frickson <john@frickson.us>
  2014-05-23 03:53 ` Re: Query buffer allocate error in copy_statement_with_parameters John C. Frickson <john@frickson.us>
@ 2014-05-27 18:21   ` Heikki Linnakangas <hlinnakangas@vmware.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Heikki Linnakangas @ 2014-05-27 18:21 UTC (permalink / raw)
  To: John C. Frickson <john@frickson.us>; pgsql-odbc

On 05/23/2014 06:53 AM, John C. Frickson wrote:
> 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.

Works for me. I tested this with the attached test program (modified 
from a test in the regression suite). Can you modify it so that it 
exhibits the problem you're seeing?

- Heikki

-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Attachments:

  prepare-test.tar.gz (application/gzip, 2.4K) download

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2014-05-27 18:21 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-05-22 17:55 Query buffer allocate error in copy_statement_with_parameters John C. Frickson <john@frickson.us>
2014-05-23 03:53 ` John C. Frickson <john@frickson.us>
2014-05-27 18:21   ` Heikki Linnakangas <hlinnakangas@vmware.com>

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