Received: from kodu.home.ee (isdn-54.uninet.ee [194.204.0.118]) by hub.org (8.9.3/8.9.3) with ESMTP id BAA41802 for ; Thu, 29 Jul 1999 01:55:45 -0400 (EDT) (envelope-from hannu@trust.ee) Received: from trust.ee (hannu@localhost [127.0.0.1]) by kodu.home.ee (8.8.7/8.8.7) with ESMTP id JAA00642; Thu, 29 Jul 1999 09:04:12 +0300 Sender: hannu@kodu.home.ee Message-ID: <379FEEDC.11FFBD7@trust.ee> Date: Thu, 29 Jul 1999 09:04:12 +0300 From: Hannu Krosing Organization: Trust-O-Matic =?iso-8859-1?Q?O=DC?= X-Mailer: Mozilla 4.5 [en] (X11; U; Linux 2.2.6 i686) X-Accept-Language: en MIME-Version: 1.0 To: The Hermit Hacker CC: "G. Anthony Reina" , Tom Lane , pgsql-hackers@postgreSQL.org Subject: Re: [HACKERS] pg_dump not dumping all tables References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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" ? 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 withoutdata.sql ------------------------- Hannu