From: Radu-Adrian Popescu <radu.popescu@aldratech.com>
To: Postgres Admin List <pgsql-admin@postgresql.org>
Subject: [Fwd: Re: \d command]
Date: 22 Jan 2002 18:08:21 +0200
Message-ID: <1011715701.1188.23.camel@rpopescu> (raw)
-----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 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@virginia.edu
>
>
>
>
>
>
>
>
>
--
Radu-Adrian Popescu
CSA, DBA, Programmer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: radu.popescu@aldratech.com
Subject: Re: [Fwd: Re: \d command]
In-Reply-To: <1011715701.1188.23.camel@rpopescu>
References: <1011715701.1188.23.camel@rpopescu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox