From: | Hannu Krosing <hannu(at)trust(dot)ee> |
---|---|
To: | The Hermit Hacker <scrappy(at)hub(dot)org> |
Cc: | "G(dot) Anthony Reina" <reina(at)nsi(dot)edu>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] pg_dump not dumping all tables |
Date: | 1999-07-29 06:04:12 |
Message-ID: | 379FEEDC.11FFBD7@trust.ee |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
The Hermit Hacker wrote:
>
> On Wed, 28 Jul 1999, G. Anthony Reina wrote:
>
> > Again, the text file is over 2 Gig so I can't seem to find an editor that is
> > big enough to hold it all in memory (I only have a half a gig of RAM). So it
> > really is just guesswork. Anything you can think of to strip the data from
> > this big of a file?
>
> egrep "^CREATE|^COPY" <filename> ?
Nay,we have currently nice multi-line CREATEs.
the following python script should to work
------------------------------------------------------
#!/usr/bin/env python
import sys
in_data = 0
while 1:
line = sys.stdin.readline()
if not line: break
if line[:5] == 'COPY ':
in_data = 1
if not in_data: sys.stdout.write(line)
if in_data and line[:2] == '\\.':
in_data = 0
-----------------------------------------------------
as you can probably guess it is used as
stripdata.py <withdata.sql >withoutdata.sql
-------------------------
Hannu
From | Date | Subject | |
---|---|---|---|
Next Message | Hiroshi Inoue | 1999-07-29 08:29:38 | RE: [HACKERS] double opens |
Previous Message | Hannu Krosing | 1999-07-29 05:42:45 | Re: Selectivity of "=" (Re: [HACKERS] Index not used on simple se lect) |