X-Original-To: pgsql-novice-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3D3713B4683 for ; Wed, 15 Dec 2004 15:12:33 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 57840-10 for ; Wed, 15 Dec 2004 15:12:14 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.195]) by svr1.postgresql.org (Postfix) with ESMTP id D39073B464B for ; Wed, 15 Dec 2004 15:12:17 +0000 (GMT) Received: by wproxy.gmail.com with SMTP id 55so120111wri for ; Wed, 15 Dec 2004 07:12:17 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=A5Ywv9pwnkT75JxAisaVlb4K3RALG9OmEd8/i2W15d7lqe1pIEwA6U88GYill4x8D1kpYSgJactcG8uamKHorQzRe7EqoRiUTmFiGOCwmx9OS83LwjmLveuK2ZtnTYuB4LGSrdceuMx+lh5qitX54L77LI+FjhC42xv79/a7z+U= Received: by 10.54.4.40 with SMTP id 40mr2066427wrd; Wed, 15 Dec 2004 07:12:17 -0800 (PST) Received: by 10.54.11.12 with HTTP; Wed, 15 Dec 2004 07:12:17 -0800 (PST) Message-ID: Date: Wed, 15 Dec 2004 15:12:17 +0000 From: Gary Cowell Reply-To: Gary Cowell To: pgsqlnovice , pgsqlperform Subject: Re: [PERFORM] \d output to a file In-Reply-To: <20041215143822.37534.qmail@web51304.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <20041215143822.37534.qmail@web51304.mail.yahoo.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.809 tagged_above=0 required=5 tests=AWL, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200412/153 X-Sequence-Number: 11730 On Wed, 15 Dec 2004 06:38:22 -0800 (PST), sarlav kumar wrote: > Hi All, > > I would like to write the output of the \d command on all tables in a > database to an output file. There are more than 200 tables in the database. > I am aware of \o command to write the output to a file. But, it will be > tough to do the \d for each table manually and write the output to a file. > Is there a command/ way in which I can achieve this without having to do it > for each table? > Any help in this regard would be really appreciated. > > Thanks, > Saranya > > Try something like: psql -c "\d *" >listing.txt