Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2004
    Location
    Amiens (FRANCE)
    Posts
    15

    Question Unanswered: 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

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    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

  3. #3
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •