Re: list of databases in C ? libpq ?

Поиск
Список
Период
Сортировка
От Alex Hunsaker
Тема Re: list of databases in C ? libpq ?
Дата
Msg-id z2u34d269d41005071048l22482478z8ccd72b42486edd7@mail.gmail.com
обсуждение исходный текст
Ответ на list of databases in C ? libpq ?  (Joao Ferreira gmail <joao.miguel.c.ferreira@gmail.com>)
Ответы Re: list of databases in C ? libpq ?  (Reid Thompson <reid.thompson@ateb.com>)
Список pgsql-general
On Fri, May 7, 2010 at 11:18, Joao Ferreira gmail
<joao.miguel.c.ferreira@gmail.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/.

В списке pgsql-general по дате отправления:

Предыдущее
От: Steve Clark
Дата:
Сообщение: Re: postgreSQL not working after upgrade to Ubuntu 10.4
Следующее
От: AllieH
Дата:
Сообщение: Re: postgreSQL not working after upgrade to Ubuntu 10.4