am Fri, dem 04.05.2007, um 12:48:24 +0100 mailte Oliveiros Cristina folgendes:
> Hello, list.
>
> I have a CSV file with two values/row and I would like to import it into a
> table who has two columns as well.
>
> Is there an easy and expedited way to do this with Postgres administration tool
> (PgAdmin)? I can do a program that parses the file and INSERTs the values on
> table, but I suspect that there is an easy way and that it is not worth the
> effort.
I'm not familiar with PGAdmin, but with console you can use a way like
this to insert the contents of a CSV-file into a database table on a
remote host:
cat <file.csv> | ssh <host> "psql -U <user> <database> -c 'copy <table> from stdin;'"
Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net