X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 02E5C52B5C for ; Fri, 15 Jul 2005 06:16:22 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 91789-05 for ; Fri, 15 Jul 2005 09:16:21 +0000 (GMT) Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by svr1.postgresql.org (Postfix) with ESMTP id 89B5452AF4 for ; Fri, 15 Jul 2005 06:16:18 -0300 (ADT) Received: from mainbox.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id 6A8034163CE; Fri, 15 Jul 2005 10:16:04 +0100 (BST) Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id 951F115EE7; Fri, 15 Jul 2005 09:52:10 +0100 (BST) Received: from mainbox.archonet.com ([127.0.0.1]) by localhost (mainbox [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 27747-09; Fri, 15 Jul 2005 09:52:08 +0100 (BST) Received: from [192.168.1.17] (client17.office.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id E521515EE1; Fri, 15 Jul 2005 09:52:06 +0100 (BST) Message-ID: <42D77936.3060708@archonet.com> Date: Fri, 15 Jul 2005 09:52:06 +0100 From: Richard Huxton User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: sunny076@yahoo.com Cc: pgsql-sql@postgresql.org Subject: Re: How to obtain the list of data table name only References: <1121379882.854728.128920@z14g2000cwz.googlegroups.com> In-Reply-To: <1121379882.854728.128920@z14g2000cwz.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.056 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200507/136 X-Sequence-Number: 22114 sunny076@yahoo.com wrote: > 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" Something like this perhaps? SELECT * FROM information_schema.tables WHERE table_schema='public' AND table_type='BASE TABLE'; Of course, you'll probably want to allow for multiple schemas. -- Richard Huxton Archonet Ltd