| From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
|---|---|
| To: | felix(at)crowfix(dot)com |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Tabbed data in tab-separated output |
| Date: | 2007-01-04 12:07:53 |
| Message-ID: | 20070104120535.GA31698@svana.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Thu, Jan 04, 2007 at 12:16:17AM -0800, felix(at)crowfix(dot)com wrote:
> On Wed, Jan 03, 2007 at 10:31:46PM -0600, mike wrote:
> > How are you attempting to restore the table after using psql? Psql
> > insert statements? Pgdump? COPY FROM?
>
> Actually, right now I feed the dump file into a program which mangles
> it and analyzes it in various ways. It will eventually be fed into
> psql for restoration elsewhere. The problem isn't restoring it. It's
> not knowing how to tell which tabs are field separators and which are
> part of the data.
psql is prety dumb that way, being designed for people not programs. I
think recent versions will escape the tab.
I suggest you use \copy instead, which on recent versions will allow you
to copy from a query. Alternativly, use a delimiter that doesn't exist
in your data.
Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | veejar | 2007-01-04 13:47:37 | LargeObjects Total Size |
| Previous Message | Bill Moran | 2007-01-04 11:46:03 | Re: could not open file xxxx for writing: Permission |