pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: lehmann@cnm.de
To: Hiroshi Inoue <inoue@tpf.co.jp>
Cc: pgsql-odbc@postgresql.org
Subject: Re: SQLDescribeParam / SUPPORT_DESCRIBE_PARAM
Date: Thu, 10 Nov 2011 03:07:38 +0100
Message-ID: <875195352e9274e2c0078113d3762051@cnm.de> (raw)
In-Reply-To: <4EB9F81C.6000108@tpf.co.jp>
References: <4EB9DA9C.7040800@cnm.de>
	<4EB9F81C.6000108@tpf.co.jp>

Hello,

> Please check the *Server side prepare* option of your datasource or
> add UseServerSidePrepare=1 to your connection string.

I tried, but it doesn't work completely. Actually, when I just use 
UseServerSidePrepare = 1 in odbc.ini, I get some error like this:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to 
allocate 3086129905 bytes) in testbase.php on line 64

Then when I add Parse = 1 it works fine on the command line, ie. when I 
call the php-cgi instance with the testscript.

But is soon as I start the script through Apache und mod_php with the 
same ldd-dependencies, I again get exhausted memory errors.

I traced the query - it's as simple as "select count(*) from sessions 
where cust_id = ?" - and I found these lines:

[ODBC][3429][1320890058.574677][SQLNumResultCols.c][248]
                 Exit:[SQL_SUCCESS]
                         Count = 0xb7f2a80c -> 1
[ODBC][3429][1320890058.574872][SQLColAttributes.c][280]
                 Entry:
                         Statement = 0x9c3cff0
                         Column Number = 1
                         Field Identifier = SQL_COLUMN_NAME
                         Character Attr = 0xb7f2a82c
                         Buffer Length = 32
                         String Length = 0xbff54e3a
                         Numeric Attribute = (nil)
[ODBC][3429][1320890058.576863][SQLColAttributes.c][597]
                 Exit:[SQL_SUCCESS]

So SQLNumResultCols = 1 seems to be correct. But String Length = 
0xbff54e3a seems to be very absurd! That's 3220524602 bytes which means 
around 3 GB! But the correct result is an integer of 5. Any idea how 
this problem arises? Does psqlodbc through mod_php not set the 
Parse-option? What is the actual problem? I didn't have such problems 
with the DBD::Pg driver.

Kind regards
Marten



view thread (4+ messages)  latest in thread

Message-ID: <875195352e9274e2c0078113d3762051@cnm.de>
Permalink:  ../875195352e9274e2c0078113d3762051@cnm.de/
Also on:    postgresql.org/message-id/875195352e9274e2c0078113d3762051@cnm.de

 · 

reply

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: lehmann@cnm.de, inoue@tpf.co.jp
  Subject: Re: SQLDescribeParam / SUPPORT_DESCRIBE_PARAM
  In-Reply-To: <875195352e9274e2c0078113d3762051@cnm.de>
  References: <4EB9DA9C.7040800@cnm.de> <4EB9F81C.6000108@tpf.co.jp> <875195352e9274e2c0078113d3762051@cnm.de>

* 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