Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2006
    Posts
    2

    Unanswered: query to retrive name of all tables/fields in a database

    i need to get query to getthe name of all tables in database. in MySql mysql_tablename(resultset) will serv the purpose. i want to know is there any bulit in function in postgre sserving the purpose. or query doing that....

  2. #2
    Join Date
    Nov 2003
    Posts
    2,933
    Provided Answers: 12

  3. #3
    Join Date
    Dec 2006
    Posts
    2

    query to get fieldname from a table

    i need a query or any bulit function () of postgresql to retrieve field name of table in database. already i had query like""SHOW FIELDS FROM ".$dbname.".".$table"". bt it My sql query.. i need to replace it into Postgresql

  4. #4
    Join Date
    Nov 2003
    Posts
    2,933
    Provided Answers: 12
    Check out the manual, the information is available in the system catalogs: http://www.postgresql.org/docs/8.1/static/catalogs.html

    You are probably interested in the pg_class table

    Btw: what is a bulit function? Something that shoots?

  5. #5
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848

    Information Schema...

    Check out Post #10 in the PosgtreSQL FAQ in this forum. The information schema is generally easier to use, and is more consistent with other vendors.
    Last edited by loquin; 12-14-06 at 14:35. Reason: spelling
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


  6. #6
    Join Date
    Nov 2003
    Posts
    2,933
    Provided Answers: 12
    Quote Originally Posted by loquin
    The information schema is generally easier to use, and is more conmsistent with other vendors.
    Very good point.

Posting Permissions

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