[Fwd: Re: \d command]

From: Radu-Adrian Popescu <radu(dot)popescu(at)aldratech(dot)com>
To: Postgres Admin List <pgsql-admin(at)postgresql(dot)org>
Subject: [Fwd: Re: \d command]
Date: 2002-01-22 16:08:21
Message-ID: 1011715701.1188.23.camel@rpopescu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

-----Forwarded Message-----

From: Radu-Adrian Popescu <radu(dot)popescu(at)aldratech(dot)com>
To: Jodi Kanter <jkanter(at)virginia(dot)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 code that 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(at)virginia(dot)edu
>
>
>
>
>
>
>
>
>
--

Radu-Adrian Popescu
CSA, DBA, Programmer

Browse pgsql-admin by date

  From Date Subject
Next Message Stephan Szabo 2002-01-22 16:15:11 Re: \d command
Previous Message Joe Conway (wwc) 2002-01-22 15:55:17 Re: \d command