Received: from www.aldratech.com ([213.157.162.9]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0MG6Cl89563 for ; Tue, 22 Jan 2002 11:06:12 -0500 (EST) (envelope-from radu.popescu@aldratech.com) Subject: [Fwd: Re: \d command] From: Radu-Adrian Popescu To: Postgres Admin List Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0.1 Date: 22 Jan 2002 18:08:21 +0200 Message-Id: <1011715701.1188.23.camel@rpopescu> Mime-Version: 1.0 Received: from rpopescu ([192.168.0.6]) by mail.aldratech.com (JAMES SMTP Server 1.2.1rc2) with SMTP ID 234 for ; Tue, 22 Jan 2002 18:06:11 +0200 X-Archive-Number: 200201/140 X-Sequence-Number: 3027 -----Forwarded Message----- From: Radu-Adrian Popescu To: Jodi Kanter 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