Thread: PostgreSQL Client Program

PostgreSQL Client Program

From
Jreniz
Date:
Hi!

I´ve a Linux RH6.2 machine with PostgreSQL 6.5.3, this works fine with
PHP module, but, I need create a GTK client program that sends queries
to database.

I saw the manuals and documentation but, i don´t know how compile these
programs, and the manuals don´t say it!!

Please send me any piece of code in C that conects the database using
libpq or libpq++ and the mode of compilation!!!

ThankX



Re: PostgreSQL Client Program

From
"Anthony E . Greene"
Date:
On Mon, 08 Jan 2001 19:50:00 Jreniz wrote:
>I´ve a Linux RH6.2 machine with PostgreSQL 6.5.3, this works fine with
>PHP module, but, I need create a GTK client program that sends queries
>to database.
>
>I saw the manuals and documentation but, i don´t know how compile these
>programs, and the manuals don´t say it!!
>
>Please send me any piece of code in C that conects the database using
>libpq or libpq++ and the mode of compilation!!!

See GtkSQL <http://www.multimania.com/bbrox/GtkSQL/>

Version 0.3 was written for PostgreSQL 6.3, but I just compiled it on my
RH6.2 machine with PG 6.5.3 and it works fine. I made a few changes in the
Makefile:

  PGSQLIBS    = -L/usr/lib/pgsql -lpq
  PGSQLCFLAGS = -I/usr/include/pgsql -DUSE_POSTGRESQL
  PGSQLOBJS   = postgres.o

I also commented out the MySQL section, since I don't have that on my
machine.


Tony
--
Anthony E. Greene <agreene@pobox.com> <http://www.pobox.com/~agreene/>
PGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26  C484 A42A 60DD 6C94 239D
Chat:  AOL/Yahoo: TonyG05    ICQ: 91183266
Linux. The choice of a GNU Generation. <http://www.linux.org/>