Re: ecpg and multiple connections

Поиск
Список
Период
Сортировка
Искать
От
Jason Davis
Тема
Re: ecpg and multiple connections
Дата
Msg-id
200110192356.f9JNuK166304@perseus.tassie.net.au
Ответ на
Список
Дерево обсуждения
ecpg and multiple connections Edward Pilipczuk <edx@zeng.uranos.eu.org>
Re: ecpg and multiple connections Jason Davis <jdavis@tassie.net.au>
>I have problem in my application.
>I must handle queries to multiple databases concurrently.
>In a documentation set there is only information how to open named 
>connections in order to differentiate them.
>In documantaion the query statements 'EXEC SQL SELECT ...' 
>does not provide interface for the connection name.
>ECPGdo has the second aprameters set to NULL, what is the purpose of 
>this parameter ?  Connection name ? Other object type ?

If I read you correctly, the syntax you are after is

EXEC SQL CONNECT TO db1 AS conn1;
EXEC SQL CONNECT TO db2 AS conn2;

EXEC SQL AT db1 SQL_STATEMENTS;
EXEC SQL AT db2 SQL_STATEMENTS;

EXEC SQL DISCONNECT db1;
EXEC SQL DISCONNECT db2;

Hope this helps.

cheers,
Jason Davis


В списке pgsql-novice по дате отправления
От: Joel Burton
Дата:
Сообщение: Re: Connect to pg via tcpip
От: Vijay Deval
Дата:
FAQ