Search Postgresql Archives

Re: psqlodbc problem Urgent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

 We use postgres version 7.5.9-2 with psqlodbc version 7.3-3 that comes 
as built in package with RHEL3 for our application.We  found a bug in
psqlodbc. When we  try to execute a query while the postgres database is
down or  crashed (Note: This condition occurs after calling SQLConnect
once to  connect to postgres & several calls to executeQuery) the 
SQLExecute crashes displaying Broken pipe.

Note: But i did not find this in earlier version of psqlodbc.

The Code goes like this I call this function executeQuery multiple
times  with pause in between. Between two calls to executeQuery, the
postgres crashes and the very first call to executeQuery after that
causes the program to crash as mentioned above.

 ##################################
 Void executeQuery()
 {
        int i, iRetValue;

         iRetValue = SQLPrepare( hstmt, (UCHAR *) cmds[i], SQL_NTS );

         if ( iRetValue != SQL_SUCCESS )
         {
             printf( "SQLError SQLPrepare() failed\n" );
             return;
         }

         //printf("Executing: %s\n", cmds[i]);
         iRetValue = SQLExecute ( hstmt );
         if ( iRetValue != SQL_SUCCESS )
         {
             printf( "SQLError SQLExecute() failed with retVal: %d\n",
 iRetValue
         }
 );

 Is their any way to verify postgres connection. If so please help me.


                                                           with regards
					         raja




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux