Re: getting list of columns from a query

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: getting list of columns from a query
Дата
Msg-id AANLkTi=FU+=humCnqD-t58rwQag4j5HowD=sZgHWYnih@mail.gmail.com
обсуждение исходный текст
Ответ на getting list of columns from a query  (c k <shreeseva.learning@gmail.com>)
Ответы Re: getting list of columns from a query  (c k <shreeseva.learning@gmail.com>)
Список pgsql-general
Hello

2010/8/22 c k <shreeseva.learning@gmail.com>:
> Hi all,
> As I am using MS Access for a long time, many tools like ms access provides
> a way to get the list of columns from a query. (using filed list in combo
> boxes in ms access). But is it possible to get such list of columns from a
> query where it is not known to the user, that which columns are defined in
> the base 'SELECT' statement? How? I dynamically created SQL statements many
> times this situation occurs where the columns are not fixed and we have to
> get the list of columns from such a query.
> Thanks in advance.
>

Yes, it is possible, you can get a description of prepared statement's
result. See: PQprepare, PQdescribePrepared, PQdescribePortal. These
functions are in client postgresql library -
http://www.postgresql.org/docs/8.4/interactive/libpq-exec.html#LIBPQ-EXEC-MAIN

Regards

Pavel Stehule

> CPK
>

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

Предыдущее
От: "Octavio Alvarez"
Дата:
Сообщение: Re: getting list of columns from a query
Следующее
От: Arturo Pérez
Дата:
Сообщение: Re: nntp not working