Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2006
    Posts
    2

    Unanswered: newbie @ PostgreSQL; need help...

    Hi,

    I have some trouble in using Postgre...

    1. how can I retrieve informations for a table in Postgre?
    in MySQL, I can do this by "DESCRIBE table_name".
    But it doesn't work in Postgre...

    2. what is the different between Function and Procedure in Postgre?
    And how can I list the Functions I've create before?

    3. I use PHP ADODB for data abstraction layer in my application, but I don't know yet how to call my function in Postgre in ADODB and how to return the results to PHP...

    ok, that's all...
    hope someone can help me...


    thx b4

  2. #2
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    1. Use the Information Schema. Ref post # 10 in the PostgreSQL FAQ at the top of this forum.

    2. There is no difference between procedures and functions in pg: 'procedures' in PostgreSQL are just functions that return no (void) values.

    functions are also documented in the information schema. See #1.

    3. I don't use PHP, so someone else will have to field this one.
    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


  3. #3
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    Quote Originally Posted by rick20
    1. how can I retrieve informations for a table in Postgre?
    in MySQL, I can do this by "DESCRIBE table_name".
    But it doesn't work in Postgre...
    You can use the \d command in psql.

    Details can be found in the manual:
    http://www.postgresql.org/docs/8.1/static/app-psql.html

    For creating procedures and functions I also recommend to read the manual:
    http://www.postgresql.org/docs/8.1/static/plpgsql.html

    If you are a newbie it usually helps to read the manual before asking questions.
    It's amazing what valuable information is burried in them

    Ah, and one more thing: it's called Postgres or PostgreSQL but not Postgre

Posting Permissions

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