Re: Get the tables names?

From: Roberto Mello <rmello(at)cc(dot)usu(dot)edu>
To: Magnus Landahl <magnus(dot)landahl(at)datessa(dot)se>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Get the tables names?
Date: 2001-07-20 18:27:15
Message-ID: 20010720122715.A5060@cc.usu.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thu, Jul 19, 2001 at 11:04:40AM +0200, Magnus Landahl wrote:
> Hi everybody!
>
> Is it possible to get the names of all tables in the database with a sql
> query??

SELECT tablename FROM pg_tables WHERE tablename NOT LIKE '%pg_%';

The "NOT LIKE" part is to avoid getting the PostgreSQL internal tables
in the output.

-Roberto
--
+----| http://fslc.usu.edu USU Free Software & GNU/Linux Club |------+
Roberto Mello - Computer Science, USU - http://www.brasileiro.net
http://www.sdl.usu.edu - Space Dynamics Lab, Developer
*** TURN OFF YOUR SYSTEM NOW !!! ***

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Dado Feigenblatt 2001-07-20 19:26:22 PLpgSQL
Previous Message Dado Feigenblatt 2001-07-20 17:13:04 Re: nextval on insert by arbitrary sequence