Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id E3147475E14 for ; Wed, 8 Jan 2003 04:51:43 -0500 (EST) Received: from matrix.gatewaynet.com (unknown [217.19.69.50]) by postgresql.org (Postfix) with ESMTP id C57FB4758F1 for ; Wed, 8 Jan 2003 04:51:42 -0500 (EST) Received: from matrix.gatewaynet.com (matrix.gatewaynet.com [217.19.69.50]) by matrix.gatewaynet.com (8.12.5/8.12.5) with ESMTP id h08DxrXR013451; Wed, 8 Jan 2003 11:59:53 -0200 Received: from localhost (achill@localhost) by matrix.gatewaynet.com (8.12.5/8.12.5/Submit) with ESMTP id h08DxrMu013447; Wed, 8 Jan 2003 11:59:53 -0200 Date: Wed, 8 Jan 2003 11:59:53 -0200 (GMT+2) From: Achilleus Mantzios To: Alan Gutierrez Cc: pgsql-sql@postgresql.org Subject: Re: SQL list table names In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/91 X-Sequence-Number: 10956 On Wed, 8 Jan 2003, Alan Gutierrez wrote: > 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 or SELECT tablename from pg_tables where tablename NOT LIKE 'pg%'; > > Alan Gutierrez > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > ================================================================== Achilleus Mantzios S/W Engineer IT dept Dynacom Tankers Mngmt Nikis 4, Glyfada Athens 16610 Greece tel: +30-10-8981112 fax: +30-10-8981877 email: achill@matrix.gatewaynet.com mantzios@softlab.ece.ntua.gr