Re: Retrieving a list of tables

From: "Duncan Adams (DNS)" <duncan(dot)adams(at)vcontractor(dot)co(dot)za>
To: "'pgsql-php(at)postgresql(dot)org'" <pgsql-php(at)postgresql(dot)org>
Subject: Re: Retrieving a list of tables
Date: 2001-10-17 08:58:58
Message-ID: C54EF5B83335D311BCB50000C11042B102C8C692@vodabemail1.vodacom.co.za
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

select * from pg_tables where tablename not like 'pg_%'

-----Original Message-----
From: David C. Brown [mailto:dbrown(at)centennialwines(dot)com]
Sent: Tuesday, October 16, 2001 10:09 PM
To: pgsql-php(at)postgresql(dot)org
Subject: [PHP] Retrieving a list of tables

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

Browse pgsql-php by date

  From Date Subject
Next Message Alessandro Ferrarin 2001-10-17 09:08:32 Re: Retrieving a list of tables
Previous Message Ben.Westgarth 2001-10-16 23:01:59 Re: Encrypt given Data