Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 9E4B4476391 for ; Wed, 8 Jan 2003 04:36:56 -0500 (EST) Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id 147EA475EA9 for ; Wed, 8 Jan 2003 04:36:56 -0500 (EST) Received: by news.hub.org (Postfix, from userid 8) id D589343A9A4; Wed, 8 Jan 2003 04:36:55 -0500 (EST) From: Alan Gutierrez X-Newsgroups: comp.databases.postgresql.sql Subject: Re: SQL list table names Date: Wed, 08 Jan 2003 03:34:17 -0600 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 12 Message-ID: References: <3E1AB00F.1040207@infophil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en In-Reply-To: <3E1AB00F.1040207@infophil.com> To: pgsql-sql@postgresql.org X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/90 X-Sequence-Number: 10955 alviN wrote: > is it possible to execute an sql query to be able to list the tables's > names? well, you can do it on psql using \dt. but im talking about the SQL > statement, because i want to execute that query from a script. Oh, even *I* know the answer to this one! Run psql with the -E argument to see the SQL used to run \dt. Look at man psql for for info for just: psql -E template1 Alan Gutierrez