Re : import from csv - Mailing list pgadmin-support

From Laurent ROCHE
Subject Re : import from csv
Date
Msg-id 540141.52046.qm@web34404.mail.mud.yahoo.com
Whole thread Raw
List pgadmin-support
Hi David,

I have not seen any replied to that ... so here I go.

No, there's no other option than psql AFAIK when using the COPY order with the data in the same file (COPY ... FROM STDIN).
Dave explained before, that COPY uses the console and the PG Admin III edit tool is not a console app but a window app.

But if you use a file and that file is on your PG server you can use the syntax,
COPY my_table FROM '/home/me/data/my_file.csv' CSV;

That will work but you will need to have the file on the same machine as the Postgres Server (that's why I put a Unix file name but that will work on Windows too).

 
Have fun,
L@u
The Computing Froggy


----- Message d'origine ----
De : David BOCCOU <DBOCCOU@odaxys.fr>
À : pgadmin-support@postgresql.org
Envoyé le : Lundi, 2 Avril 2007, 12h47mn 58s
Objet : [pgadmin-support] import from csv

Hi all

 

I’ve read that the ‘Copy’ command could not be used with pgAdmin III : is there an alternative way to import data from a .csv file using pgAdmin, or is mandatory to use psql ?

 

Thank you for reading me

 

David




Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses.

pgadmin-support by date:

Previous
From: Dave Page
Date:
Subject: Re: error on the website
Next
From: brsaweda@gmail.com
Date:
Subject: Re: pgadmin III crashes when inserting a row (1.6.2 and 1.6.3)