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

From: Radu-Adrian Popescu <[EMAIL PROTECTED]>
To: Jodi Kanter <[EMAIL PROTECTED]>
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
> [EMAIL PROTECTED]
> 
> 
> 
>  
> 
>  
> 
>  
> 
-- 



Radu-Adrian Popescu
CSA, DBA, Programmer


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to