Thread: Accessing PostgreSQL from C++

Accessing PostgreSQL from C++

From
Jeff Brown
Date:
Hi guys

Is there some sort of C API available for PostgreSQL?

Cheers
Jeff

Re: Accessing PostgreSQL from C++

From
Alvaro Herrera
Date:
On Mon, May 30, 2005 at 11:31:17PM -0700, Jeff Brown wrote:
> Hi guys
>
> Is there some sort of C API available for PostgreSQL?

For C you can use libpq.  For C++, see libpqxx in gborg.org (or did it
move to pgfoundry.org?)

--
Alvaro Herrera (<alvherre[a]surnet.cl>)
"Oh, great altar of passive entertainment, bestow upon me thy discordant images
at such speed as to render linear thought impossible" (Calvin a la TV)

System info in/through database on Windows 2000 Postres 8.x

From
"Oisin Glynn"
Date:
Hi,

I am wondering if there is a way to get simple (or more advanced ) system
information from the database about the server.  Free disk space, Memory
usage, CPU usage.  And any other  health of system information in general.
I have done some archive searching but not turned up very much. This is
Postgres 8.x on Windows 2000

Thanks in advance,

Oisin






Re: Accessing PostgreSQL from C++

From
Havasvölgyi Ottó
Date:
Jeff,

Yes, libpq. Look at the 27th chapter in the manual.

Otto


----- Original Message -----
From: "Jeff Brown" <intolife10@yahoo.com>
To: <pgsql-general@postgresql.org>
Sent: Tuesday, May 31, 2005 8:31 AM
Subject: [GENERAL] Accessing PostgreSQL from C++


> Hi guys
>
> Is there some sort of C API available for PostgreSQL?
>
> Cheers
> Jeff
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>
>


Re: Accessing PostgreSQL from C++

From
Christopher Browne
Date:
intolife10@yahoo.com (Jeff Brown) wrote:
> Is there some sort of C API available for PostgreSQL?

Yes, there is a C API available for PostgreSQL.  It is called libpq.

Was there some particular reason why you could not find it in the
documentation?  It has an entire chapter devoted to it in the
documentation tree...

<http://www.postgresql.org/docs/current/static/libpq.html>
--
output = ("cbbrowne" "@" "ntlug.org")
http://linuxdatabases.info/info/lsf.html
Rules of the Evil Overlord #25.  "No matter how well it would perform,
I  will never  construct any  sort  of machinery  which is  completely
indestructible  except  for   one  small  and  virtually  inaccessible
vulnerable spot." <http://www.eviloverlord.com/>

Re: Accessing PostgreSQL from C++

From
Gianni Mariani
Date:
Jeff Brown wrote:

>Hi guys
>
>Is there some sort of C API available for PostgreSQL?
>
>

I'm quite happy with libpqxx.

ftp://gborg.postgresql.org/pub/libpqxx/stable/libpqxx-2.5.0.tar.gz

>Cheers
>Jeff
>
>---------------------------(end of broadcast)---------------------------
>TIP 8: explain analyze is your friend
>
>