newbee, about a bulk loading from a cdv file - Mailing list pgsql-novice
From | Alonso Isidoro Roman |
---|---|
Subject | newbee, about a bulk loading from a cdv file |
Date | |
Msg-id | CAKR5Mf04Wb25OYm+B01eZak25B3TROrK6i13zXuGjaFBtZKJPg@mail.gmail.com Whole thread Raw |
Responses |
Re: newbee, about a bulk loading from a cdv file
(Albe Laurenz <laurenz.albe@wien.gv.at>)
Re: newbee, about a bulk loading from a cdv file (Gerald Cheves <gcheves@verizon.net>) Re: newbee, about a bulk loading from a cdv file (Jude DaShiell <jdashiel@panix.com>) |
List | pgsql-novice |
hi, i am just trying to do a bulk data loading using this way and i am finding problems. I have just created an user in my system, tom/mypass, then i have just created the user and the database, then the tables:
MacBook-Pro-Retina-de-Alonso:~ aironman$ psql template1
psql (9.3.5)
Type "help" for help.
template1=# CREATE USER tom WITH PASSWORD 'mypass';
CREATE ROLE
template1=# CREATE DATABASE "TrialDB";
CREATE DATABASE
template1=# GRANT ALL PRIVILEGES ON DATABASE "TrialDB" to tom;
GRANT
TrialDB=> CREATE TABLE core2door_element
TrialDB-> (
TrialDB(> id serial NOT NULL,
TrialDB(> key character varying(255) NOT NULL,
TrialDB(> type character varying(255) NOT NULL,
TrialDB(> label character varying(255) NOT NULL,
TrialDB(> longitude double precision NOT NULL,
TrialDB(> latitude double precision NOT NULL,
TrialDB(> parent_id integer,
TrialDB(> CONSTRAINT core2door_element_pkey PRIMARY KEY (id),
TrialDB(> CONSTRAINT core2door_element_parent_id_fkey FOREIGN KEY (parent_id)
TrialDB(> REFERENCES core2door_element (id) MATCH SIMPLE
TrialDB(> ON UPDATE NO ACTION ON DELETE NO ACTION DEFERRABLE INITIALLY DEFERRED
TrialDB(> )
TrialDB-> WITH (
TrialDB(> OIDS=FALSE
TrialDB(> );
CREATE TABLE
TrialDB=> ALTER TABLE core2door_element OWNER TO tom;
ALTER TABLE
Now, if i try to launch COPY command:
TrialDB=> COPY core2door(id,key,type,label,longitude,latitude,parent_id) FROM '/Users/aironman/Documents/tektroniks/fake_data_entity.csv' WITH DELIMITER ',' CSV HEADER;
ERROR: must be superuser to COPY to or from a file
HINT: Anyone can COPY to stdout or from stdin. psql's \copy command also works for anyone.
COPY is not working, trying with \copy:
TrialDB=> \copy core2door(id,key,type,label,longitude,latitude,parent_id) FROM '/Users/aironman/Documents/tektroniks/fake_data_entity.csv' WITH DELIMITER ',' CSV HEADER;
/Users/aironman/Documents/tektroniks/fake_data_entity.csv: Permission denied
permission denied too!
As you can see, the cdv file have every permission:
MacBook-Pro-Retina-de-Alonso:tektroniks aironman$ ls -l fake_data_entity.csv
-rwxrwxrwx+ 1 aironman staff 351 sep 15 09:53 fake_data_entity.csv
what do i am doing wrong?
Regards!
PS
my apologies if this is a not a correct question, but i am desperate.
Alonso Isidoro Roman.
Mis citas preferidas (de hoy) :
"Si depurar es el proceso de quitar los errores de software, entonces programar debe ser el proceso de introducirlos..."
- Edsger Dijkstra
My favorite quotes (today):
"If debugging is the process of removing software bugs, then programming must be the process of putting ..."
- Edsger Dijkstra
Mis citas preferidas (de hoy) :
"Si depurar es el proceso de quitar los errores de software, entonces programar debe ser el proceso de introducirlos..."
- Edsger Dijkstra
My favorite quotes (today):
"If debugging is the process of removing software bugs, then programming must be the process of putting ..."
- Edsger Dijkstra
"If you pay peanuts you get monkeys"
pgsql-novice by date: