We are migrating from INFORMIX to POSTGRES;
Currently we use the following code (for both INFORMIX and POSTGRES,) to
connect to the database:
EXEC SQL CONNECT TO :acDatabase AS CONNECTION_MAIN;
If we need to cancel an SQL request in INFORMIX we call;
This interrupts the database server and cancels any SQL statement currently
As I understand it POSTGRES uses the libpq functions of:
PQgetCancel, PQfreeCancel and PQcancel.
However if we've used the above 'CONNECT TO' method to connect to the
database we don't have a PGconn connection object which is used by
My question is therefore, should we be using libpq C function PQconnectdb to
connect to the database which will return us the PGconn connection object to
use in PGgetCancel, or is there anotherway to interrupt the database server?
I should note that this is a multi-threaded application running on AIX 6.1.
The WARNING box in the POSTGRESQL guide says that "On Uunix, forking a
process with open libpg connections can lead to unpredictable results..." If
this is the case how should the database server be interrupted?
Thanks to all in advance.
pgsql-novice by date
|Next:||From: Dara Olson||Date: 2010-03-03 23:17:33|
|Subject: sql query on multiple contains|
|Previous:||From: A. Kretschmer||Date: 2010-03-03 11:08:46|
|Subject: Re: Array or not Array?|