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 3B7B73B4631 for ; Wed, 15 Dec 2004 15:04:27 +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 54130-08 for ; Wed, 15 Dec 2004 15:04:15 +0000 (GMT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.184]) by svr1.postgresql.org (Postfix) with ESMTP id 4DC3E3B4628 for ; Wed, 15 Dec 2004 15:04:16 +0000 (GMT) Received: from [212.227.126.162] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1CeahM-0002EF-00 for pgsql-novice@postgresql.org; Wed, 15 Dec 2004 16:04:16 +0100 Received: from [194.25.154.138] (helo=pinguin.schollglas.com) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1CeahM-00088n-00 for pgsql-novice@postgresql.org; Wed, 15 Dec 2004 16:04:16 +0100 Received: from kretschmer by pinguin.schollglas.com with local (Exim 3.33 #6) id 1CeahE-0002yB-00 for pgsql-novice@postgresql.org; Wed, 15 Dec 2004 16:04:08 +0100 Date: Wed, 15 Dec 2004 16:04:08 +0100 From: Andreas Kretschmer To: pgsqlnovice Subject: Re: [despammed] \d output to a file Message-ID: <20041215150408.GA11184@Pinguin.wug-glas.de> References: <20041215143822.37534.qmail@web51304.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041215143822.37534.qmail@web51304.mail.yahoo.com> User-Agent: Mutt/1.4i X-DEST: 208 X-MSMail-Priority: High X-MSMail-Virus: X5O!P%@AP[4PZX54(P^)7CC)7}-STANDARD-ANTIVIRUS-TEST-FILE!+H* X-Message-Flag: My name is root. Just root. And I am licensed to kill -9 X-PrivatMail: kretschmer@kaufbach.delug.de X-OS: Linux - weil ich es mir Wert bin! X-Info: registrierter Linux-User 97922 http://counter.li.org X-LUG: http://lug-dd.schlittermann.de X-Handy: 0160 / 8256486 (privat) X-Fax: 035204 / 40505 (privat) X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:51ea9561fc3f6d9539a2acd743e4748c X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.676 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_WHOIS, MISSING_MIMEOLE, X_MSMAIL_PRIORITY_HIGH X-Spam-Level: X-Archive-Number: 200412/106 X-Sequence-Number: 11683 am 15.12.2004, um 6:38:22 -0800 mailte sarlav kumar folgendes: > 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. 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'. Andreas -- Andreas Kretschmer (Kontakt: siehe Header) Tel. NL Heynitz: 035242/47212 GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net === Schollglas Unternehmensgruppe ===