Skip site navigation (1) Skip section navigation (2)


From: lehmann(at)cnm(dot)de
To: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
Cc: <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: SQLDescribeParam / SUPPORT_DESCRIBE_PARAM
Date: 2011-11-10 02:07:38
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-odbc

> 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:

                         Count = 0xb7f2a80c -> 1
                         Statement = 0x9c3cff0
                         Column Number = 1
                         Field Identifier = SQL_COLUMN_NAME
                         Character Attr = 0xb7f2a82c
                         Buffer Length = 32
                         String Length = 0xbff54e3a
                         Numeric Attribute = (nil)

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

In response to


pgsql-odbc by date

Next:From: Hiroshi InoueDate: 2011-11-10 03:46:26
Subject: Re: FETCH LAST is returning "no data" after a Cursor Update
Previous:From: Hiroshi InoueDate: 2011-11-09 17:57:17
Subject: Re: Locale problem with psqlODBC under Fedora 16

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group