From: | Christoph Dalitz <christoph(dot)dalitz(at)hs-niederrhein(dot)de> |
---|---|
To: | tlw(at)att(dot)com |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: psql command line question.. |
Date: | 2003-01-29 09:19:40 |
Message-ID: | 20030129101940.6da5885b.christoph.dalitz@hs-niederrhein.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> Date: Tue, 28 Jan 2003 23:53:49 -0500
> From: "Williams, Travis L, NPONS" <tlw(at)att(dot)com>
>
> I have a bunch of huge inserts in a flat file.
> They are in proper sql context and I can take each individual and copy/paste
> it into psql and it inserts fine. I tried doing a psql -e dbname < file.sql
> and I get errors. Is there anything specific I need to do to the file format?
>
I have observed very strange behaviour with psql when the input data contains
TAB characters. Maybe that's your problem too.
Replacing nonprintable characters with blanks is somewhat tricky, but possible
with sed:
# 0B is the hex code for TAB
char2replace="`echo -e \x0B`"
sed "s/$char2replace/ /g" ...
Hope this helps,
Christoph Dalitz
From | Date | Subject | |
---|---|---|---|
Next Message | Iain Cox | 2003-01-29 09:24:39 | Unsubscribe |
Previous Message | Rick Gigger | 2003-01-29 09:16:15 | Re: embedded postgres |