Re: [GENERAL] list of databases in C ? libpq ?

2010-05-11 Thread Reid Thompson
On 5/7/2010 1:48 PM, Alex Hunsaker wrote: On Fri, May 7, 2010 at 11:18, Joao Ferreira gmail 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"... The first example in the online docs does exactly that... h

Re: [GENERAL] list of databases in C ? libpq ?

2010-05-07 Thread Steve Atkins
On May 7, 2010, at 10:18 AM, Joao Ferreira gmail 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"... > > but I need it in C ! I never used C before to access PG. > > the libpq API seems a bit scary !

Re: [GENERAL] list of databases in C ? libpq ?

2010-05-07 Thread Alex Hunsaker
On Fri, May 7, 2010 at 11:18, Joao Ferreira gmail 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

[GENERAL] list of databases in C ? libpq ?

2010-05-07 Thread Joao Ferreira gmail
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"... 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 m