From: | Alex Hunsaker <badalex(at)gmail(dot)com> |
---|---|
To: | Joao Ferreira gmail <joao(dot)miguel(dot)c(dot)ferreira(at)gmail(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: list of databases in C ? libpq ? |
Date: | 2010-05-07 17:48:58 |
Message-ID: | z2u34d269d41005071048l22482478z8ccd72b42486edd7@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, May 7, 2010 at 11:18, Joao Ferreira gmail
<joao(dot)miguel(dot)c(dot)ferreira(at)gmail(dot)com> wrote:
> Hello all,
>
> I need to write an application in C to read the list of databases
> currently in the server. very much like a "psql -l"...
select datname as database from pg_database;
> but I need it in C ! I never used C before to access PG.
>
> the libpq API seems a bit scary ! Is there anything, shipped with
> postgresql, other than libpq that would make my life simpler ?
Maybe ecpg http://www.postgresql.org/docs/current/static/ecpg.html ? I
also hear good things about libpqtypes making some things easier
http://pgfoundry.org/projects/libpqtypes/.
From | Date | Subject | |
---|---|---|---|
Next Message | AllieH | 2010-05-07 17:54:15 | Re: postgreSQL not working after upgrade to Ubuntu 10.4 |
Previous Message | Steve Crawford | 2010-05-07 17:45:36 | Re: postgreSQL not working after upgrade to Ubuntu 10.4 |