Re: Retrieving a list of tables

Поиск
Список
Период
Сортировка
От
Тема Re: Retrieving a list of tables
Дата
Msg-id Pine.LNX.4.30.0110171654070.13484-100000@hindang.msuiit.edu.ph
обсуждение исходный текст
Ответ на Retrieving a list of tables  ("David C. Brown" <dbrown@centennialwines.com>)
Список pgsql-php
On Tue, 16 Oct 2001, David C. Brown wrote:

> Heyas,
>
>     I need to be able to get a list of the tables from a postgresql from
> php.  I'm
> porting a php-mysql website over to postgresql.    I have a form that
> populates
> a <SELECT> statment with the tables in the db.
>
> In Mysql I just used the sql query "SHOW TABLES;" postgresql doesn't
> support that sql statment, and pg-php doesn't like me sending a "\d" as
> a
> query.
>
> Anyone have any help, or ideas how I may be able to work around this?
> or is there a query for pg-sql that I don't know about?
>
> Any and all help would be great...  Thanx
>
> Dave
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

  Hey ,....


      If you want to know the list of tables in a certain database,
  you can query the pg_table table.

      select * from pg_tables where tableowner = 'ME';

      Its not really a table but a view, it contains all the tables in a
database where you connected including the system tables of postgres so be
sure to filter your query.

      Let me know if this was what you need ....


                                                Erle Czar S. Mantos
                                          erle@hindang.msuiit.edu.ph

                                      ---------- MARTIANS LAIR ---------


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly




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

Предыдущее
От: "David C. Brown"
Дата:
Сообщение: Retrieving a list of tables
Следующее
От: "Duncan Adams (DNS)"
Дата:
Сообщение: Re: Retrieving a list of tables