[Fwd: Re: \d command] - Mailing list pgsql-admin

From Radu-Adrian Popescu
Subject [Fwd: Re: \d command]
Date
Msg-id 1011715701.1188.23.camel@rpopescu
Whole thread Raw
List pgsql-admin
-----Forwarded Message-----

From: Radu-Adrian Popescu <radu.popescu@aldratech.com>
To: Jodi Kanter <jkanter@virginia.edu>
Subject: Re: [ADMIN] \d command
Date: 22 Jan 2002 18:05:19 +0200

With debugging enable and tailing log/pgsql, here it is :

SELECT c.relname as "Name",
  CASE c.relkind WHEN 'r' THEN 'table' WHEN 'v' THEN 'view' WHEN 'i'
THEN 'index' WHEN 'S' THEN 'sequence' WHEN 's' THEN 'special' END as
"Type",
  u.usename as "Owner"
FROM pg_class c LEFT JOIN pg_user u ON c.relowner = u.usesysid
WHERE c.relkind IN ('r','v','S','')
  AND c.relname !~ '^pg_'
ORDER BY 1;

To replicate, enable :
    log_connections = true
    debug_print_query = true
in your postgresql.conf file, then restart (reload) the server.


On Tue, 2002-01-22 at 17:41, Jodi Kanter wrote:
> Can anyone tell me the sql that is being sent to the database when typeing this command? I am working on writing some
codethat will show a list of columns in a table. Is there a describe statement? 
> Thanks
> Jodi Kanter
> _______________________________
> Jodi L Kanter
> BioInformatics Database Administrator
> University of Virginia
> (434) 924-2846
> jkanter@virginia.edu
>
>
>
>
>
>
>
>
>
--



Radu-Adrian Popescu
CSA, DBA, Programmer


pgsql-admin by date:

Previous
From: "Joe Conway (wwc)"
Date:
Subject: Re: \d command
Next
From: Stephan Szabo
Date:
Subject: Re: \d command