Received: from mail.postgresql.org (webmail.postgresql.org [216.126.85.28]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f0R0sqq68899 for ; Fri, 26 Jan 2001 19:54:52 -0500 (EST) (envelope-from pgsql-sql-owner@postgresql.org) Received: from news.tht.net (news.hub.org [216.126.91.242]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f0PLTdq25325 for ; Thu, 25 Jan 2001 16:29:39 -0500 (EST) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.1/8.11.1) id f0PL2C605843 for pgsql-sql@postgresql.org; Thu, 25 Jan 2001 16:02:12 -0500 (EST) (envelope-from news) From: "Mike D'Agosta" X-Newsgroups: comp.databases.postgresql.sql Subject: Re: Is there anything like DESCRIBE? Date: Thu, 25 Jan 2001 12:56:17 -0800 Organization: earthtribe.net Lines: 25 Message-ID: <94q48i$5me$1@news.tht.net> References: <94n93j$2j6j$1@news.tht.net> Reply-To: "Mike D'Agosta" X-Complaints-To: scrappy@hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 To: pgsql-sql@postgresql.org X-Archive-Number: 200101/404 X-Sequence-Number: 1080 I got a response in email, so I assume the author wants to remain anonymous. He wrote: >There's an option to psql (I think -E or -e) that will make it echo all >the SQL queries it does when you do something like "\d table" So running a "psql -E " and then doing a "\d " will give you information similar to what you would normally get from a DESCRIBE. Mike ---------------------------------------------------------------------------- -------------------------- "Mike D'Agosta" wrote in message news:94n93j$2j6j$1@news.tht.net... > Hi, > > I have a number of empty tables and I want to get the column names and > data types with an SQL statement. I want to do this procedurally, not > interactively (so I can't use \d in psql). Postgres doesn't > support DESCRIBE... is there any other way to do this? > > Thanks! > Mike