Re: SQL list table names

From: Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
To: Alan Gutierrez <ajglist(at)izzy(dot)net>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: SQL list table names
Date: 2003-01-08 13:59:53
Message-ID: Pine.LNX.4.44.0301081159400.13271-100000@matrix.gatewaynet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice pgsql-sql

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(at)matrix(dot)gatewaynet(dot)com
mantzios(at)softlab(dot)ece(dot)ntua(dot)gr

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Randy D. McCracken 2003-01-08 14:02:47 Search and Replace
Previous Message Alan Gutierrez 2003-01-08 09:34:17 Re: SQL list table names

Browse pgsql-sql by date

  From Date Subject
Next Message Randy D. McCracken 2003-01-08 14:02:47 Search and Replace
Previous Message Tomasz Myrta 2003-01-08 13:41:54 Re: full join in view