Overview
Features
Download
Documentation
Community
Add-Ons & Services

Data support of Postgresql?

Discussion of ideas for features and new projects based on POCO.

Data support of Postgresql?

Postby chinistan » 30 Dec 2008, 04:19

As titile.
chinistan
 
Posts: 10
Joined: 22 Dec 2008, 07:46

Re: Data support of Postgresql?

Postby alex » 30 Dec 2008, 12:59

Currently only through ODBC. Works well.
alex
 
Posts: 1048
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Data support of Postgresql?

Postby aderouineau » 18 May 2009, 17:42

It might work well, but it's one more thing that has to be installed, and one more layer to go through (thus more execution time needed), especially with ODBC. It would be really great to see native support for Postgres. The lack of so many databases is, I think, the main reason to use another API instead (such as SQLAPI++).
aderouineau
 
Posts: 163
Joined: 18 May 2009, 17:38

Re: Data support of Postgresql?

Postby alex » 18 May 2009, 19:52

aderouineau wrote:It might work well, but it's one more thing that has to be installed, and one more layer to go through (thus more execution time needed), especially with ODBC. It would be really great to see native support for Postgres. The lack of so many databases is, I think, the main reason to use another API instead (such as SQLAPI++).

I'm not sure whether/how does SQLAPI provide access to PostgreSQL without anything being installed. The web page claims that PostgreSQL access is through libpq. On the other side, using ODBCng, you get wire-level ODBC and don't need libpq at all. On windows, ODBC is part of the operating system. On Linux/UNIX, it is not. But there is always something to install, either PostgreSQL native client library or ODBC manager and/or driver, or both.

I am talking to PostgreSQL through ODBC and it works fine for me. But I am by no means against PostgreSQL connector. It's just that I have no time and nobody has volunteered to contribute it yet. Whoever has an itch is more than welcome to scratch it by either wrapping libpq or do native PostgreSQL POCO data connector.
alex
 
Posts: 1048
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Data support of Postgresql?

Postby aderouineau » 19 May 2009, 19:41

libpq is Postresql's equivalent of the mysql library/headers to acces the backend.
So it is the native library, and thus much faster than using ODBC (which would need to go through that library too).

There's a reason for POCO to provide native access to mySQL and to SQLight; that same reason applies to the other databases. PG being the opensource eqiivalent of Oracle, it should be integrated in Poco.
aderouineau
 
Posts: 163
Joined: 18 May 2009, 17:38

Re: Data support of Postgresql?

Postby alex » 19 May 2009, 21:53

aderouineau wrote:libpq is Postresql's equivalent of the mysql library/headers to acces the backend.
So it is the native library, and thus much faster than using ODBC (which would need to go through that library too).

I should have said wire-level, rather than native. At any rate, libpq is another layer, just like ODBCng driver is one layer (it does not depend on libpq), so their performance should be roughly equivalent. Strictly speaking, the fastest way to access PostgreSQL from POCO would be a Poco::Data connector talking directly to the database without any intermediaries.
aderouineau wrote:There's a reason for POCO to provide native access to mySQL and to SQLight; that same reason applies to the other databases. PG being the opensource eqiivalent of Oracle, it should be integrated in Poco.

As I mentioned in my previous reply, that is desirable and encouraged. It will happen as soon as someone with an incentive strong enough to do it appears.
alex
 
Posts: 1048
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Data support of Postgresql?

Postby aderouineau » 19 May 2009, 22:41

So you're saying that POCO doesn't use the official mySQL library to access the mysql backend?
aderouineau
 
Posts: 163
Joined: 18 May 2009, 17:38

Re: Data support of Postgresql?

Postby alex » 19 May 2009, 23:33

aderouineau wrote:So you're saying that POCO doesn't use the official mySQL library to access the mysql backend?

I did not say that.
alex
 
Posts: 1048
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Data support of Postgresql?

Postby aderouineau » 19 May 2009, 23:49

Well as I said, libpq is PG's equivalent of the mysql lib/headers. So the integration of PG into POCO would have to be through this library.
aderouineau
 
Posts: 163
Joined: 18 May 2009, 17:38

Re: Data support of Postgresql?

Postby alex » 24 May 2009, 01:23

aderouineau wrote:Well as I said, libpq is PG's equivalent of the mysql lib/headers.

Yes it is.
aderouineau wrote:So the integration of PG into POCO would have to be through this library.

No, it would not. It could be, but it does not have to be.
alex
 
Posts: 1048
Joined: 11 Jul 2006, 16:27
Location: United_States

Next

Return to Wishlist

Who is online

Users browsing this forum: No registered users and 1 guest