libpq or ESQL

Поиск
Список
Период
Сортировка
От Atif Jung
Тема libpq or ESQL
Дата
Msg-id d1c6b9c51003030745l4a4749aayce4ebb5393a33c69@mail.gmail.com
обсуждение исходный текст
Список 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

В списке pgsql-novice по дате отправления:

Предыдущее
От: "A. Kretschmer"
Дата:
Сообщение: Re: Array or not Array?
Следующее
От: "Dara Olson"
Дата:
Сообщение: sql query on multiple contains