Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2002
    Location
    Pilipinas
    Posts
    36

    Red face Unanswered: how to get column_name value?

    guys, how do i get the column_name value of a certain table?

    like:
    table_name=product

    ----------------------------------------------------------------
    id | prd_code | prd_price | prd_model
    ----------------------------------------------------------------
    04 | MDL104 | 23280000 | PCU023
    05 | MDL102 | 27600000 | PCU002

    how do get those prd_id, prd_code, prd_price and prd_model?

    theres pg_shadow for the passwprds, pg_database for database_name ,... and so on...

    how about the cloumn names for a certain table?

    pls help...
    --- Hey! its me!!! the MaleMan ---

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    i have no idea about where postresql stores its table definitions

    however, you might try this --

    select * from yourtable where 1=0


    rudy

  3. #3
    Join Date
    Apr 2002
    Location
    Calgary, Canada
    Posts
    30
    \d table_name

    the \d is the same as describe.

    Is that what you mean ?

  4. #4
    Join Date
    Sep 2001
    Location
    Vienna
    Posts
    400

    Hint

    I don't know exactly
    But if you want to know what is going around
    Use Programms like phppgadmin or for windows pgadmin
    and turn in your postgresql.conf the debug options on

    So the database server is logging the submitted sql statements. Do in the application what you like to do and look how it selects it
    Easy algorithm uand usaable for all actions :-)
    http://www.postgresql.org
    --Postgresql is the only kind of thing--

  5. #5
    Join Date
    Mar 2002
    Location
    Pilipinas
    Posts
    36

    Arrow

    Thanks Guys!
    --- Hey! its me!!! the MaleMan ---

Posting Permissions

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