From: | Atif Jung <atifjung(at)gmail(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | libpq or ESQL |
Date: | 2010-03-03 15:45:59 |
Message-ID: | d1c6b9c51003030745l4a4749aayce4ebb5393a33c69@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
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;
sqlbreak();
This interrupts the database server and cancels any SQL statement currently
running.
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
PQgetCancel.
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.
Atif
From | Date | Subject | |
---|---|---|---|
Next Message | Dara Olson | 2010-03-03 23:17:33 | sql query on multiple contains |
Previous Message | A. Kretschmer | 2010-03-03 11:08:46 | Re: Array or not Array? |