Re: platform independent set-up - Mailing list pgsql-novice

From Jason Tan
Subject Re: platform independent set-up
Date
Msg-id Pine.LNX.3.95.1010917114823.22773L-100000@rebel.rebel.net.au
Whole thread Raw
In response to platform independent set-up  (jeroen.van.rest@philips.com)
List pgsql-novice
On Thu, 13 Sep 2001 jeroen.van.rest@philips.com wrote:

> Hi,
>
> We are working on a project that requires a platform-independent collection of modules. For example, we currently
havea prototype version of a front-end running, developed with QT. I've also got postgreSQL running using CygWin. There
isno need for 
> network-functionality, everything should run on one machine, but we want to be able to transfer it completely
(includingdatabase) from WinNT to Linux and back. 
> We also need speed in this application. That's why we prefer to code in C(++).
>
> The question now is how to communicate from my front-end to the database and back? I don't know much about this part
ofsystems, but I guess that ODBC and JDBC are the kind of stuff I need. But I am not sure if they have what I need. I
don'tthink ODBC 
> can run on Linux, or that there is a JDBC driver for (postgres on CygWin).

I am not sure baout how well teh win side of any psotgres stuff works<
I havent used it.

But if you are using c++ you can access postgres using c/c++ libraries
that are inlcuded with postegres(at elast they are under unix) and
referred to as libpq which also ahs I think a C++ bidning.

You coudl use odbc, which we use for ome projets at work here(thought i
have nto been invlovled with ODBC usage parts).

We also use JDBC to conenct to postgres.

And as alluded to above have also used C/C++ to access postgres via libpq.

All work fairly well, although I think there are some less comoanly parts
of he jdbc interfaces that are not implemtned under psotregs(or at least
there were last time I used it) - I have never suffffered because of this.

I suspect if you want speed then C/C++ is the best best over java, whether
that is directly via libpq or via odbc really depends on your app.

One thing we do with our apps is build our own library of routines for
accessing teh database fucntionality,.

We try to make it very genral and then only use it inteh applciations.
The idea here is if we ever want to move to a different Db, tehn we only
ahve to rewrite the implementationof the libarary as sopposed to re
wreitign large chunks of the app, which is what we woudl ahve to do if we
used libpq directly in the app code.

Anotehr appreoach with simialr benfirts thought nto as generally ueful is
to write a module that directly uses libpq but that does all of the
databse sutff.

Once again you only have to rewrite the module if you decide to change
dbs.

Jason


 >
> Could anyone assist me here?
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>

--
------------------------------------------------------------------------------
Jason Tan                                                jason@rebel.net.au
     "Democracy is two wolves and a lamb voting on what to have for lunch.
                 Liberty is a well-armed lamb contesting the vote."
                               ~Benjamin Franklin, 1759
------------------------------------------------------------------------------


pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: no attribute tuple 1259 -2
Next
From: Bo Lorentsen
Date:
Subject: Re: accumulate setof ?