Re: psqlodbc problem Urgent

From: raja chidambaram <raja(at)solnettechnologies(dot)com>
To: pgsql-general(at)postgresql(dot)org, ilugc(at)ae(dot)iitm(dot)ac(dot)in
Subject: Re: psqlodbc problem Urgent
Date: 2006-06-03 03:59:08
Message-ID: 1149307148.3148.6.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Browse pgsql-general by date

  From Date Subject
Next Message Tomi NA 2006-06-03 07:01:51 Re: Best open source tool for database design / ERDs?
Previous Message Chris Velevitch 2006-06-03 00:54:55 Re: create view problem