Here is the definition of a view I use to retrieve all of the tables and a 
list of columns for tables that appear in the "public" schema ... I have 
others that only retrieve a list of the table names and the views in the 
public schema as well...

-- View: "vcat_pgcolumns"

-- DROP VIEW vcat_pgcolumns;

CREATE OR REPLACE VIEW vcat_pgcolumns AS
 SELECT psut.relid AS tbloid, pa.attnum AS colid, psut.relname AS tblname, 
pa.attname AS colname
   FROM pg_stat_user_tables psut
   JOIN pg_attribute pa ON psut.relid = pa.attrelid
  WHERE psut.schemaname = 'public'::name AND pa.attstattarget = -1
  ORDER BY psut.relname, pa.attnum;

ALTER TABLE vcat_pgcolumns OWNER TO postgres;

"Sunny" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Hi,
>
> I am wondering if anyone can tell me how I can obtain only the list of
> data table in postgresql without function and other ancillary tables. I
> hope that I can add a tag that can filter only data table.
>
> I am using the following SQL Statement:
>
> "SELECT TABLE_NAME, TABLE_TYPE FROM INFORMATION_SCHEMA.TABLES"
>
> I would appreciate if anyone can enligten me on how this can be
> achieve.
>
> Sunny
> 



---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to