cancel
Showing results for 
Search instead for 
Did you mean: 

XA connector for EDB Postgres

vk
Adventurer

XA connector for EDB Postgres

Hi,

Is there a native (non-ODBC, non-JDBC) XA connector for EDB Postgres? To use it from plain C applications.

7 REPLIES
EDB Team Member

Re: XA connector for EDB Postgres

Hi vk,

 

          libpq is the C application programmer’s interface to Advanced Server. libpq is a set of library functions that allow client programs to pass queries to the Advanced Server and to receive the results of these queries. libpq is also the underlying engine for several other EnterpriseDB application interfaces including those written for C++, Perl, Python, Tcl, and ECPG. So some aspects of libpq’s behavior will be important to the user if one of those packages is used. Client programs that use libpq must include the header file libpq-fe.h and must link with the libpq library.

 

Following is the sample code for the same :

 

#include <stdio.h>
#include <libpq-fe.h>

int main()
{

PGconn          *conn;

conn=PQconnectdb("dbname=postgres host=localhost user=postgres password=postgres");

        if (PQstatus(conn) == CONNECTION_BAD)
        {
                puts("Unable to connect to the database");
                exit(0);
        }

        PQexec(conn,"create table c_code_test(id int)");

        PQfinish(conn);
        return 0;
}
vk
Adventurer

Re: XA connector for EDB Postgres

Hi dhananjayjejur,

Thanks for the answer, but the question was about distributed transactions processing with XA.
As I know ODBC driver for Postgres contains implementation of XA routines for xa_switch_t structure in pgxalib.cpp.
Is there non-ODBC implementation of XA routines written in plain C, that can be used with Oracle Tuxedo?

EDB Team Member

Re: XA connector for EDB Postgres

Hi  vk,

 

The OCI connector provides an API similar to the Oracle Call Interface. Applications that are written to use the Oracle Call Interface may be recompiled using EnterpriseDB's OCI connector in order to interact with an Advanced Server database server.

 

Below is the link for the detailed documentation :

EDB Postgres Advanced Server OCI Connector Guide

 

Hope this helps.

vk
Adventurer

Re: XA connector for EDB Postgres

Hi dhananjayjejur,


Thanks for your response. Unfortunately XA implementation's sources are not available for Oracle,
they are compiled into libclntsh.so library, so access to OCI layer doesn’t help here.


I recently found article "How-To: Running the Oracle Tuxedo banking app with Postgres Plus":

that describes my use case. But in this article in chapter 8.16 "Compile & deploy XA Connector"
is used pgsw.c, that i didn't find in EDB Postgres Enterprice installation.

Does this file exist in one of the current EDB Postgres releases or available anywhere as a separate download?
Adventurer

Re: XA connector for EDB Postgres


@vk wrote:

...
I recently found article "How-To: Running the Oracle Tuxedo banking app with Postgres Plus":

that describes my use case. But in this article in chapter 8.16 "Compile & deploy XA Connector"
is used pgsw.c, that i didn't find in EDB Postgres Enterprice installation.

Does this file exist in one of the current EDB Postgres releases or available anywhere as a separate download?

Hello,

 

Any update on the question regarding availability of pgsw.c if it exists?

 

We're researching supporting EDB Postgres but require Tuxedo C XA connector for EDB Postgres as well.

 

Rich

Community Manager

Re: XA connector for EDB Postgres

Hi Rich,

 

EDB is, unfortunately for this need, no longer actively working on an XA Connector; instead, the focus is on JDBC, ODBC, OCI, and .NET.  This isn't to say it's a closed door - merely that there would need to be compelling reason to renew that effort.  If you'd like, we can have someone reach out from the EDB team to discuss further 1-to-1.

 

Regards,

 

Jamie Watt

Adventurer

Re: XA connector for EDB Postgres

Hi Jamie,

 

Thanks for the response.

 

Unfortunately it means we cannot offer an EDB Postgres integration solution for our product to our current and future customers without a Tuxedo C XA connector.

 

I'll pass this info on to our product decision makers to prioritize and follow up if needed.

 

Rich