Re: list fieldnames in table? (from PHP)

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: list fieldnames in table? (from PHP)
Дата
Msg-id 20041026040439.GA37556@winnie.fuhr.org
обсуждение исходный текст
Ответ на list fieldnames in table? (from PHP)  (Miles Keaton <mileskeaton@gmail.com>)
Список pgsql-general
On Mon, Oct 25, 2004 at 07:36:43PM -0700, Miles Keaton wrote:
> Is there a simple way to list fieldnames in a table, from PHP?
>
> When on the command-line, I just do \d tablename

If you run "psql -E" or type "\set ECHO_HIDDEN" after you're
in psql then you'll see the hidden queries that psql sends for
"\d tablename", etc.  Examine those queries and use the relevant
parts in your own code.

You might want to familiarize yourself with the system catalogs,
which is what you'll be querying:

http://www.postgresql.org/docs/7.4/static/catalogs.html

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

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

Предыдущее
От: Steven Klassen
Дата:
Сообщение: Re: list fieldnames in table? (from PHP)
Следующее
От: "Deepa K"
Дата:
Сообщение: [Fwd: Abrupt close of pgsql backend]