Skip site navigation (1) Skip section navigation (2)

Re: [PERFORM] \d output to a file

From: Gary Cowell <gary(dot)cowell(at)gmail(dot)com>
To: pgsqlnovice <pgsql-novice(at)postgresql(dot)org>,pgsqlperform <pgsql-performance(at)postgresql(dot)org>
Subject: Re: [PERFORM] \d output to a file
Date: 2004-12-15 15:12:17
Message-ID: e5305258041215071242b95d2d@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novicepgsql-performance
On Wed, 15 Dec 2004 06:38:22 -0800 (PST), sarlav kumar
<sarlavk(at)yahoo(dot)com> 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

In response to

pgsql-novice by date

Next:From: Joe ConwayDate: 2004-12-15 15:16:20
Subject: Re: function returning a row
Previous:From: Andreas KretschmerDate: 2004-12-15 15:04:08
Subject: Re: [despammed] \d output to a file

pgsql-performance by date

Next:From: GeoffreyDate: 2004-12-15 15:17:10
Subject: Re: \d output to a file
Previous:From: Andreas KretschmerDate: 2004-12-15 15:04:08
Subject: Re: [despammed] \d output to a file

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group