pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
SQL list table names
4+ messages / 4 participants
[nested] [flat]

* SQL list table names
@ 2003-01-07 10:46 alviN <gamboa@infophil.com>
  2003-01-07 11:03 ` Re: SQL list table names Adam Witney <awitney@sghms.ac.uk>
  2003-01-08 09:34 ` Re: SQL list table names Alan Gutierrez <ajglist@izzy.net>
  0 siblings, 2 replies; 4+ messages in thread

From: alviN @ 2003-01-07 10:46 UTC (permalink / raw)
  To: pgsql-sql

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.

thanks.



alviN




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: SQL list table names
  2003-01-07 10:46 SQL list table names alviN <gamboa@infophil.com>
@ 2003-01-07 11:03 ` Adam Witney <awitney@sghms.ac.uk>
  1 sibling, 0 replies; 4+ messages in thread

From: Adam Witney @ 2003-01-07 11:03 UTC (permalink / raw)
  To: alviN <gamboa@infophil.com>; pgsql-sql


If you start psql like so

psql -E

Then all the SQL behind the \d type commands is displayed for you.

adam


> 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.
> 
> thanks.
> 
> 
> 
> alviN
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: SQL list table names
  2003-01-07 10:46 SQL list table names alviN <gamboa@infophil.com>
@ 2003-01-08 09:34 ` Alan Gutierrez <ajglist@izzy.net>
  2003-01-08 13:59   ` Re: SQL list table names Achilleus Mantzios <achill@matrix.gatewaynet.com>
  1 sibling, 1 reply; 4+ messages in thread

From: Alan Gutierrez @ 2003-01-08 09:34 UTC (permalink / raw)
  To: pgsql-sql

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




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: SQL list table names
  2003-01-07 10:46 SQL list table names alviN <gamboa@infophil.com>
  2003-01-08 09:34 ` Re: SQL list table names Alan Gutierrez <ajglist@izzy.net>
@ 2003-01-08 13:59   ` Achilleus Mantzios <achill@matrix.gatewaynet.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Achilleus Mantzios @ 2003-01-08 13:59 UTC (permalink / raw)
  To: Alan Gutierrez <ajglist@izzy.net>; +Cc: 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@matrix.gatewaynet.com
        mantzios@softlab.ece.ntua.gr




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2003-01-08 13:59 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-01-07 10:46 SQL list table names alviN <gamboa@infophil.com>
2003-01-07 11:03 ` Adam Witney <awitney@sghms.ac.uk>
2003-01-08 09:34 ` Alan Gutierrez <ajglist@izzy.net>
2003-01-08 13:59   ` Achilleus Mantzios <achill@matrix.gatewaynet.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox