Re: Can I read data load files without loading in db? - Mailing list pgsql-general

From consultmac2
Subject Re: Can I read data load files without loading in db?
Date
Msg-id 1156514737.626102.194650@i3g2000cwc.googlegroups.com
Whole thread Raw
In response to Can I read data load files without loading in db?  (barryc.ctr@gmail.com)
List pgsql-general
Peter Eisentraut wrote:
> Am Freitag, 25. August 2006 13:51 schrieb Martijn van Oosterhout:
> > It really depends on the format they send you. It's either plain text,
> > in which case the COPY commands will tell you which fields. If it's the
> > custom format you can use tar to extract it IIRC.
>
> You can also use pg_restore to extract "binary" dump formats to plain text.

  I used "less" to look at one of the files.  In this case its named
'db-private.pg-dump.1' and in a subdirectory called 'database' on the
CD.  "less" shows much familiar data in the file.  I would have assumed
it was in text format.
  I don't notice any COPY commands in the file as I'm looking at it via
"less", so I try to locate some via "grep" and it tells me that there
are matches, but that its a binary file so it won't show me the actual
occurrences.  !!

  I guess that I'll need to try your suggestion of using pg_restore to
extract them to plain text.   Apparently I'll need to add software to
this Fedora Core 3 installation since pg_restore isn't defined
currently.  Do you recall the switches needed?

Thanks!

-bC


pgsql-general by date:

Previous
From: "barry conner"
Date:
Subject: Re: Can I read data load files without loading in db?
Next
From: "macgillivary"
Date:
Subject: Re: How do i store arbitrary questions and answers in SQL?