psqlodbc: No memory available to store statement

[email protected] Tue, 25 Jun 2019 15:28:59 +0300
Newsgroups gmane.comp.db.postgresql.odbc
Message-ID <[email protected]>
This is a multipart message in MIME format.
--=_alternative 0044921943258424_=
Content-Type: text/plain; charset="US-ASCII"

Hello PostgreSQL Community!

I  widely  use psqlodb driver with unixODBC manager on my SLES12 linux 
machine.
Not very long ago I updated psqlodbc driver from  10.03.0000  to the 
latest one 11.01.0000 .
I use unixODBC-2.3.6-7.9.1.x86_64 package installed from YAST setup and 
configurational tool and configure, build, and install  psqlodbc from the 
source code in the same way as for psqlodbc 10.03.0000:

autoreconf -i
./configure --prefix=path_to_install --with-libpq=path_to_pg_config 
--with-unixodbc=path_to_odbc_config
make
make install

In my  program I  use quite common ODBC functions to establish a 
connection, perform a query, retrieve a result: 
SQLConnect, SQLExecDirect,  SQLFetch etc.

But after I had installed psqlodbc11.01.0000 I am constantly getting the 
following error:
No memory available to store statement *** PostgreSQL SQLSTATE = HY001

I inspected all the changes in 11.00.0000 and 11.01.0000 versions and 
found out that this behaviour is caused by the following commit:
1086a6 2018-05-23 | Call AC_CHECK_SIZEOF(long int) in configure.ac and 
always place config.h before sql....h. Due to this change, sqltypes.h of 
unixODBC can recognize SIZEOF_LONG_INT used in psqlodbc driver. [Hiroshi 
Inoue]

So, in this case I see that configure script generates config.h file with 
defined  SIZEOF_LONG_INT: #define SIZEOF_LONG_INT 0,
 while odcb_config --header says: 
#define SIZEOF_LONG_INT 8

So, in regard to this situation I have some questions.
Unfortunately there is not enough information. So what was the aim of this 
commit? 1086a6 2018-05-23 | Call AC_CHECK_SIZEOF(long int) in configure.ac 
and always place config.h before sql....h. Due to this change, sqltypes.h 
of unixODBC can recognize SIZEOF_LONG_INT used in psqlodbc driver. 
[Hiroshi Inoue] 
Did anybody face this issue? (No memory available to store statement *** 
PostgreSQL SQLSTATE = HY001 )
What do I do wrong? How to resolve this issue?

Best regards, 
Andrei Yahorau
--=_alternative 0044921943258424_=
Content-Type: text/html; charset="US-ASCII"

<font size=2 face="sans-serif">Hello PostgreSQL Community!<br>
<br>
I &nbsp;widely &nbsp;use psqlodb driver with unixODBC manager on my SLES12
linux machine.<br>
Not very long ago I updated psqlodbc driver from <b>&nbsp;10.03.0000</b>
&nbsp;to the latest one <b>11.01.0000 </b>.<br>
I use unixODBC-2.3.6-7.9.1.x86_64 package installed from YAST setup and
configurational tool and configure, build, and install &nbsp;psqlodbc from
the source code in the same way as for psqlodbc 10.03.0000:<br>
</font><tt><font size=2 color=#2f2f2f><br>
</font></tt><font size=2 color=blue face="sans-serif">autoreconf -i<br>
./configure --prefix=path_to_install --with-libpq=path_to_pg_config --with-unixodbc=path_to_odbc_config<br>
make<br>
make install</font><font size=3 face="sans-serif"><br>
<br>
</font><font size=2 face="sans-serif">In my &nbsp;program I &nbsp;use quite
common ODBC functions to establish a connection, perform a query, retrieve
a result: </font><font size=3 face="sans-serif"><br>
</font><font size=2 face="sans-serif">SQLConnect, SQLExecDirect, &nbsp;SQLFetch
etc.</font><font size=3 face="sans-serif"><br>
<br>
</font><font size=2 face="sans-serif">But after I had installed psqlodbc11.01.0000
I am constantly getting the following error:<br>
</font><tt><font size=3><b><u>No memory available to store statement ***
PostgreSQL SQLSTATE = HY001</u></b></font></tt><font size=2 face="sans-serif"><br>
<br>
I inspected all the changes in <b>11.00.0000</b> and <b>11.01.0000</b>
versions and found out that this behaviour is caused by the following commit:<br>
</font><font size=2 color=blue face="sans-serif">1086a6 2018-05-23 | Call
AC_CHECK_SIZEOF(long int) in configure.ac and always place config.h before
sql....h. Due to this change, sqltypes.h of unixODBC can recognize SIZEOF_LONG_INT
used in psqlodbc driver. [Hiroshi Inoue]</font><font size=2 face="sans-serif"><br>
<br>
So, in this case I see that configure script generates config.h file with
defined &nbsp;SIZEOF_LONG_INT: #define SIZEOF_LONG_INT 0,<br>
 while <b>odcb_config --header</b> says: <br>
#define SIZEOF_LONG_INT 8<br>
<br>
So, in regard to this situation I have some questions.<br>
Unfortunately there is not enough information. So what was the aim of this
commit? </font><font size=2 color=blue face="sans-serif">1086a6 2018-05-23
| Call AC_CHECK_SIZEOF(long int) in configure.ac and always place config.h
before sql....h. Due to this change, sqltypes.h of unixODBC can recognize
SIZEOF_LONG_INT used in psqlodbc driver. [Hiroshi Inoue]</font><font size=2 face="sans-serif">
<br>
Did anybody face this issue? (</font><tt><font size=3><b><u>No memory available
to store statement *** PostgreSQL SQLSTATE = HY001</u></b></font></tt><font size=2 face="sans-serif">
)<br>
What do I do wrong? How to resolve this issue?<br>
</font>
<br><font size=2 face="sans-serif">Best regards, </font>
<br><font size=2 face="sans-serif">Andrei Yahorau</font>
--=_alternative 0044921943258424_=--