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 791F33B46FB for ; Wed, 15 Dec 2004 15:24:09 +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 65285-06 for ; Wed, 15 Dec 2004 15:23:50 +0000 (GMT) Received: from 3times25.net (66-23-211-34.clients.speedfactory.net [66.23.211.34]) by svr1.postgresql.org (Postfix) with ESMTP id 6D6703B46CE for ; Wed, 15 Dec 2004 15:23:54 +0000 (GMT) Received: from [127.0.0.1] (rhws.home.edu [127.0.0.1]) by 3times25.net (Postfix) with ESMTP id 927B5746D3 for ; Wed, 15 Dec 2004 10:23:54 -0500 (EST) Message-ID: <41C0570A.7010505@3times25.net> Date: Wed, 15 Dec 2004 10:23:54 -0500 From: Geoffrey User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040803 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsqlnovice Subject: Re: [despammed] \d output to a file References: <20041215143822.37534.qmail@web51304.mail.yahoo.com> <20041215150408.GA11184@Pinguin.wug-glas.de> In-Reply-To: <20041215150408.GA11184@Pinguin.wug-glas.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.031 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200412/109 X-Sequence-Number: 11686 Andreas Kretschmer wrote: > 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'. Or: for table in $( ${table}.out done -- Until later, Geoffrey