Thread

  1. libpq and db information

    neil d. quiogue <neil@iphil.net> — 1998-01-12T09:38:13Z

    hello,
    
    is there any way to be able to peer to a database' information (tables and
    their fields) similar to reflection in java using libpq?  i know one can
    use the \d recursively but isn't there a way using libpq?  i need the
    information to properly modify a particular part in radius.
    
    thanks.
    
    [---]
    Neil D. Quiogue <neil@iphil.net>
    IPhil Communications Network, Inc.
    Other: neil@postgresql.org
    
    
    
  2. Re: [QUESTIONS] libpq and db information

    neil d. quiogue <neil@iphil.net> — 1998-01-12T11:59:30Z

    On Mon, 12 Jan 1998, neil d. quiogue wrote:
    
    > is there any way to be able to peer to a database' information (tables and
    > their fields) similar to reflection in java using libpq?  i know one can
    > use the \d recursively but isn't there a way using libpq?  i need the
    > information to properly modify a particular part in radius.
    
    don't you just love replying to your own questions.  i'm looking at how
    pg_dump.c implemented it (through the system catalogue).  unless anyone
    has another answer, i'll be glad to hear it.
    
    [---]
    Neil D. Quiogue <neil@iphil.net>
    IPhil Communications Network, Inc.
    Other: neil@postgresql.org
    
    
    
  3. Re: [HACKERS] libpq and db information

    Marc G. Fournier <scrappy@hub.org> — 1998-01-12T13:11:40Z

    On Mon, 12 Jan 1998, neil d. quiogue wrote:
    
    > hello,
    > 
    > is there any way to be able to peer to a database' information (tables and
    > their fields) similar to reflection in java using libpq?  i know one can
    > use the \d recursively but isn't there a way using libpq?  i need the
    > information to properly modify a particular part in radius.
    
    	Not sure if this is what you are looking for, but to implement
    this in some of my code, I just went into the pg_dump.c code and pulled
    out the required SQL statement...
    
    
    
    
  4. Re: [QUESTIONS] libpq and db information

    Peter T Mount <postgresdev@maidast.demon.co.uk> — 1998-01-12T19:39:48Z

    On Mon, 12 Jan 1998, neil d. quiogue wrote:
    
    > hello,
    > 
    > is there any way to be able to peer to a database' information (tables and
    > their fields) similar to reflection in java using libpq?  i know one can
    > use the \d recursively but isn't there a way using libpq?  i need the
    > information to properly modify a particular part in radius.
    
    In jdbc, there are methods that allow you to get details about what tables
    and columns are present, and their details.
    
    I'm still working on the code to get information about access rights to
    the various tables.
    
    All of these use SQL queries, based on libpq.
    
    These are new additions to the jdbc driver for V6.3, due beta Feb 1st.
    
    -- 
    Peter T Mount  petermount@earthling.net or pmount@maidast.demon.co.uk
    Main Homepage: http://www.demon.co.uk/finder
    Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk