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 177893B497E for ; Wed, 15 Dec 2004 16:22:14 +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 93444-06 for ; Wed, 15 Dec 2004 16:22:10 +0000 (GMT) Received: from md1.psixpress.com (md1.psixpress.com [154.32.105.205]) by svr1.postgresql.org (Postfix) with ESMTP id A9A1E3B4954 for ; Wed, 15 Dec 2004 16:22:06 +0000 (GMT) Received: from kaufbach.delug.de (128.pool1.dialup.cybernet-ag.de [195.143.124.128]) by md1.psixpress.com (MOS 3.5.6-GR) with ESMTP id CGA06148 (AUTH via LOGINBEFORESMTP); Wed, 15 Dec 2004 16:22:00 GMT Received: from kretschmer by kaufbach.delug.de with local (Exim 3.35 #1) id 1CebuX-0001b2-00 for pgsql-novice@postgresql.org; Wed, 15 Dec 2004 17:21:57 +0100 Date: Wed, 15 Dec 2004 17:21:57 +0100 From: Kretschmer Andreas To: pgsqlnovice Subject: Re: [despammed] \d output to a file Message-ID: <20041215162157.GA6127@kaufbach.delug.de> References: <20041215143822.37534.qmail@web51304.mail.yahoo.com> <20041215150408.GA11184@Pinguin.wug-glas.de> <41C0570A.7010505@3times25.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <41C0570A.7010505@3times25.net> User-Agent: Mutt/1.3.28i X-OS: Debian/GNU Linux - weil ich es mir Wert bin! X-GPG-Fingerprint: EE16 3C01 7B9C 10F7 2C8B 3B86 4DB3 D9EE 7F45 84DA X-Message-Flag: "Windows" is not the answer. "Windows" is the question and the answer is "no"! X-Lugdd: Gerd Kube X-Info: My name is root. Just root. And I am licensed to kill -9 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.087 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200412/110 X-Sequence-Number: 11687 am Wed, dem 15.12.2004, um 10:23:54 -0500 mailte Geoffrey folgendes: > >>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? > > > >You can write a little shell-script to list all tables via \d and parse > >the output to generate for each table a '\d table'. > > Or: > > for table in $(