If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > how can i get a list of tables ?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-04-04, 11:24
USA Mike USA Mike is offline
Registered User
 
Join Date: Apr 2004
Location: Amiens (FRANCE)
Posts: 15
Question how can i get a list of tables ?

hello,

i would to know, in PHP, while i'm conencting to a postgreSQL database, i can get a list of the table which are in ?

is there a global syntax SQL ?

also, i know in MySQL, it is with :

SHOW TABLE STATUS FROM mydbase


how do with postgre ?
__________________
Ps : i'm sorry for my english language expression mistake, cause i 'm french
Reply With Quote
  #2 (permalink)  
Old 08-04-04, 11:43
LKBrwn_DBA LKBrwn_DBA is offline
Registered User
 
Join Date: Jun 2003
Location: West Palm Beach, FL
Posts: 2,455
Cool

Maybe if you post this question in the PostgreSQL forum?
__________________
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
Reply With Quote
  #3 (permalink)  
Old 08-04-04, 11:45
alligatorsql.com alligatorsql.com is offline
Registered User
 
Join Date: Jul 2001
Location: Germany
Posts: 189
Select all relations in PostgreSQL

Hello,

use the following SQL statement

SELECT relname FROM pg_class WHERE relkind = 'r' AND
relowner = YOURDBIDENTIFIER
ORDER BY relname

Where YOURDBIDENTIFIER is the DB Identifier
To get the DB Identifier use
SELECT datdba FROM pg_database WHERE datname = 'mydatabase'

Hope that helps ?

Best regards
Manfred Peter
Alligator Company Software GmbH
http://www.alligatorsql.com
__________________
Give it a try ... Crossing borders with AlligatorSQL Enterprise Edition
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On