| From: | "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Problem with COPY |
| Date: | 2006-07-11 08:10:09 |
| Message-ID: | 20060711081009.GC26967@webserv.wug-glas.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
am 11.07.2006, um 9:24:06 +0200 mailte Christian Rengstl folgendes:
> Hi again everyone,
>
> i got it to work, but came across another question concerning COPY. If
> i have a column in a text file that i do not want/need in the
> database, is there a way not to read that column from the file without
> having to edit the file beforehand?
>
> Thanks for your advice!
Do you have a UNIX-like operating system? Then you can use tools like
'cut':
kretschmer(at)tux:~$ echo "s1,s2,s3" | cut -d ',' -f 1,3
s1,s3
This result can you pipe into psql.
HTH, Andreas
--
Andreas Kretschmer (Kontakt: siehe Header)
Heynitz: 035242/47215, D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
=== Schollglas Unternehmensgruppe ===
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Leif B. Kristensen | 2006-07-11 08:36:22 | Re: Problem with COPY |
| Previous Message | Harald Armin Massa | 2006-07-11 07:46:05 | Re: Emergency - postgre is not working |