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

Re: [despammed] \d output to a file

From: Andreas Kretschmer <akretschmer(at)despammed(dot)com>
To: pgsqlnovice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: [despammed] \d output to a file
Date: 2004-12-15 15:04:08
Message-ID: 20041215150408.GA11184@Pinguin.wug-glas.de (view raw or flat)
Thread:
Lists: pgsql-novicepgsql-performance
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    === 

In response to

Responses

pgsql-novice by date

Next:From: Gary CowellDate: 2004-12-15 15:12:17
Subject: Re: [PERFORM] \d output to a file
Previous:From: sarlav kumarDate: 2004-12-15 14:38:22
Subject: \d output to a file

pgsql-performance by date

Next:From: Gary CowellDate: 2004-12-15 15:12:17
Subject: Re: [PERFORM] \d output to a file
Previous:From: sarlav kumarDate: 2004-12-15 14:38:22
Subject: \d output to a file

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