Обсуждение: Official C++ API for postgresql?

Поиск
Список
Период
Сортировка

Official C++ API for postgresql?

От
niXman
Дата:
Hello,

Tell me please, whether there is an official C++ API for postgresql?

Thanks,

--
Regards,
niXman
___________________________________________________
Dual-target(32 & 64 bit) MinGW compilers for 32 and 64 bit Windows:
http://sourceforge.net/projects/mingwbuilds/


Re: Official C++ API for postgresql?

От
Ryan Kelly
Дата:
On Mon, Sep 17, 2012 at 10:58:30PM +0400, niXman wrote:
> Hello,
>
> Tell me please, whether there is an official C++ API for postgresql?
http://pqxx.org/development/libpqxx/

>
> Thanks,
>
> --
> Regards,
> niXman

-Ryan Kelly


Re: Official C++ API for postgresql?

От
Steve Atkins
Дата:
On Sep 17, 2012, at 11:58 AM, niXman <i.nixman@gmail.com> wrote:

> Hello,
>
> Tell me please, whether there is an official C++ API for postgresql?

http://pqxx.org/development/libpqxx/ is the main C++ specific library. But
you can also use libpq from C++, and for simpler work it's often easier
than libpqxx.

There are also several other C++ bindings - sqlapi++, soci and Qt are
some off the top of my head.

Cheers,
  Steve



Re: Official C++ API for postgresql?

От
niXman
Дата:
2012/9/17 Ryan Kelly:

> http://pqxx.org/development/libpqxx/

Ah, okay.

Thank you Ryan.


--
Regards,
niXman
___________________________________________________
Dual-target(32 & 64 bit) MinGW compilers for 32 and 64 bit Windows:
http://sourceforge.net/projects/mingwbuilds/


Re: Official C++ API for postgresql?

От
Dann Corbit
Дата:
-----Original Message-----
From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Steve Atkins
Sent: Monday, September 17, 2012 12:23 PM
To: pgsql-general@postgresql.org General
Subject: Re: [GENERAL] Official C++ API for postgresql?


On Sep 17, 2012, at 11:58 AM, niXman <i.nixman@gmail.com> wrote:

> Hello,
>
> Tell me please, whether there is an official C++ API for postgresql?

http://pqxx.org/development/libpqxx/ is the main C++ specific library. But you can also use libpq from C++, and for
simplerwork it's often easier than libpqxx. 

There are also several other C++ bindings - sqlapi++, soci and Qt are some off the top of my head.
>>
Not to mention the standards based drivers such as ODBC.
<<


Re: Official C++ API for postgresql?

От
niXman
Дата:
2012/9/17 Ryan Kelly:

> http://pqxx.org/development/libpqxx/

Last question...
According to the link provided by you, it is said that libpqxx comes
with postgres. But in the archive with postgres sources I haven't find
libpqxx.


--
Regards,
niXman
___________________________________________________
Dual-target(32 & 64 bit) MinGW compilers for 32 and 64 bit Windows:
http://sourceforge.net/projects/mingwbuilds/


Re: Official C++ API for postgresql?

От
Ryan Kelly
Дата:
On Mon, Sep 17, 2012 at 11:52:13PM +0400, niXman wrote:
> 2012/9/17 Ryan Kelly:
>
> > http://pqxx.org/development/libpqxx/
>
> Last question...
> According to the link provided by you, it is said that libpqxx comes
> with postgres. But in the archive with postgres sources I haven't find
> libpqxx.
It is not provided with postgres. It is a separate library. This is
where you obtain it:
http://pqxx.org/development/libpqxx/wiki/DownloadPage

-Ryan


Re: Official C++ API for postgresql?

От
niXman
Дата:
2012/9/17 Ryan Kelly:

> It is not provided with postgres. It is a separate library.

Hmm..

From link provided by you:
> This library works on top of the C-level API library, libpq. It comes with postgres.


--
Regards,
niXman
___________________________________________________
Dual-target(32 & 64 bit) MinGW compilers for 32 and 64 bit Windows:
http://sourceforge.net/projects/mingwbuilds/


Re: Official C++ API for postgresql?

От
Adrian Klaver
Дата:
On 09/17/2012 12:55 PM, Ryan Kelly wrote:
> On Mon, Sep 17, 2012 at 11:52:13PM +0400, niXman wrote:
>> 2012/9/17 Ryan Kelly:
>>
>>> http://pqxx.org/development/libpqxx/
>>
>> Last question...
>> According to the link provided by you, it is said that libpqxx comes
>> with postgres. But in the archive with postgres sources I haven't find
>> libpqxx.
> It is not provided with postgres. It is a separate library. This is
> where you obtain it:
> http://pqxx.org/development/libpqxx/wiki/DownloadPage

I think the confusing part is:

"This library works on top of the C-level API library, libpq. It comes
with postgres"

The it refers to libpq not libpqxx.

>
> -Ryan
>
>


--
Adrian Klaver
adrian.klaver@gmail.com


Re: Official C++ API for postgresql?

От
niXman
Дата:
2012/9/17 Adrian Klaver:

> The it refers to libpq not libpqxx.

I understang. Sorry..


--
Regards,
niXman
___________________________________________________
Dual-target(32 & 64 bit) MinGW compilers for 32 and 64 bit Windows:
http://sourceforge.net/projects/mingwbuilds/


Re: Official C++ API for postgresql?

От
Merlin Moncure
Дата:
On Mon, Sep 17, 2012 at 1:58 PM, niXman <i.nixman@gmail.com> wrote:
> Hello,
>
> Tell me please, whether there is an official C++ API for postgresql?

Technically speaking, the only official C++ api is libpq, which, while
a C API, is C++ compatible.  libpxx is a set of wrappers to libpq that
will give you C++ classes to use vs the more traditional C API calls.
It's very mature and works well if you prefer that style of
development.

merlin


Re: Official C++ API for postgresql?

От
John R Pierce
Дата:
On 09/17/12 12:57 PM, niXman wrote:
> 2012/9/17 Ryan Kelly:
>
>> >It is not provided with postgres. It is a separate library.
> Hmm..
>
> >From link provided by you:
>> >This library works on top of the C-level API library, libpq. It comes with postgres.

I suspect that is saying that libpq comes with postgres.



--
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast



Re: Official C++ API for postgresql?

От
John R Pierce
Дата:
On 09/17/12 12:26 PM, Dann Corbit wrote:
> Not to mention the standards based drivers such as ODBC.

the great thing about standards is there are so many to choose from. :)


ODBC, however, is, IMHO, awful.





--
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast



Re: Official C++ API for postgresql?

От
Chris Angelico
Дата:
On Tue, Sep 18, 2012 at 5:56 AM, Adrian Klaver <adrian.klaver@gmail.com> wrote:
> I think the confusing part is:
>
>
> "This library works on top of the C-level API library, libpq. It comes with
> postgres"
>
> The it refers to libpq not libpqxx.

Sounds to me like a wording change might be in order - perhaps "...
libpq, which comes with ..."?

It's a wiki, but not one with public editing, I think.

ChrisA


Re: Official C++ API for postgresql?

От
Dann Corbit
Дата:
-----Original Message-----
From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of John R Pierce
Sent: Monday, September 17, 2012 1:32 PM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Official C++ API for postgresql?

On 09/17/12 12:26 PM, Dann Corbit wrote:
> Not to mention the standards based drivers such as ODBC.

the great thing about standards is there are so many to choose from. :)


ODBC, however, is, IMHO, awful.


>>
A study by Ken North showed that there is nothing to be gained by using native low level drivers instead of ODBC in
termsof speed. 
PostgreSQL was not one of the database engines included in the study.
However, I suspect that a study of PostgreSQL would show the same tendencies.
Once you are used to programming in ODBC, it is quite simple.
Of course, I write standards based drivers for a living, so my testimony has a built-in bias.

<<