pgadmin-org / pgadmin3

Archive of the pgAdmin III project
https://www.pgadmin.org/
Other
178 stars 82 forks source link

"\copy" equivalent (RM #599) #370

Closed dpage closed 2 years ago

dpage commented 12 years ago

Issue migrated from Redmine: https://redmine.postgresql.org/issues/599 Originally created by Anonymous at 2012-02-17 21:11:09 UTC.

psql has \copy to copy from a local file. Using the JDBC driver I also often copy data into the database using the equivalent COPY .. FROM STDIN… With psycopg2 I also use COPY FROM STDIN to have the local python app feed the file to the postgres COPY command. In PGAdmin, however, to bulk load data into postgres we need to copy the CSV file to the computer where the database resides and fiddle with permissions until the database can read the file using COPY. This should be easy to implement, it wasn't hard for me to do it with both psycopg2 and with the JDBC driver, and psql has had it for years. The application (PGAdmin) needs to open the file and then feed the stream to the database COPY command as STDIN.

dpage commented 12 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/599#note-1 Originally created by Guillaume Lelarge at 2012-02-17 22:29:21 UTC.

Redmine ticket header update:

Name Old Value New Value
Status changed New In Progress
dpage commented 12 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/599#note-2 Originally created by Guillaume Lelarge at 2012-02-22 21:41:11 UTC.

Available right now on https://github.com/gleu/pgadmin3/tree/importcsv

dpage commented 12 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/599#note-3 Originally created by Guillaume Lelarge at 2012-02-23 22:14:19 UTC.

Done in http://git.postgresql.org/gitweb/?p=pgadmin3.git;a=commit;h=4d68fd1b46f7029545ba7bc9e89dc7bc6458289b

Redmine ticket header update:

Name Old Value New Value
Status changed In Progress Resolved
Resolution changed fixed
dpage commented 2 years ago

Issue closed on Redmine.