Services
24×7×365 Technical Support
Migration to PostgreSQL
High Availability Deployment
Database Audit
Remote DBA for PostgreSQL
Products
Postgres Pro Enterprise
Postgres Pro Standard
Cloud Solutions
Postgres Extensions
Resources
Blog
Documentation
Webinars
Videos
Presentations
Community
Events
Training Courses
Books
Demo Database
Mailing List Archives
About
Leadership team
Partners
Customers
In the News
Press Releases
Press Info
Services
24×7×365 Technical Support
Migration to PostgreSQL
High Availability Deployment
Database Audit
Remote DBA for PostgreSQL
Products
Postgres Pro Enterprise
Postgres Pro Standard
Cloud Solutions
Postgres Extensions
Resources
Blog
Documentation
Webinars
Videos
Presentations
Community
Events
Training Courses
Books
Demo Database
Mailing List Archives
About
Leadership team
Partners
Customers
In the News
Press Releases
Press Info
Facebook
Downloads
Home
>
mailing lists
COPY FROM file error: could not open file ... for reading: No such file or directory - Mailing list pgsql-novice
From
Ryszard Czermiński
Subject
COPY FROM file error: could not open file ... for reading: No such file or directory
Date
June 4, 2014
16:03:20
Msg-id
CANS_SThtR_sqPUj-FXqND89=m3sLy1PXZe17-4no_DRg6RWvQA@mail.gmail.com
Whole thread
Raw
Responses
Re: COPY FROM file error: could not open file ... for reading: No such file or directory
List
pgsql-novice
Tree view
I am trying to import data from csv file to a table, but COPY command
fails with "No such file or directory" error message - despite the fact that the file I am trying to read is definitely there. See below.
Apparently (as a novice :) I am missing something - your help will be highly appreciated.
Best regards,
Ryszard
$ more import_from_csv.sql
CREATE TABLE addr
(STREET varchar, CITY varchar, STATE char(2), ZIP char(10));
COPY addr FROM 'addr.csv' DELIMITER ',' CSV;
$ psql -U postgres -c 'drop table addr'
DROP TABLE
$ wc -l addr.csv
2 addr.csv
$ psql -U postgres -f import_from_csv.sql
CREATE TABLE
psql:import_from_csv.sql:3: ERROR: could not open file "addr.csv" for reading: No such file or directory
$ psql --version
psql (PostgreSQL) 9.3.4
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04 LTS"
$
pgsql-novice
by date:
Previous
From:
"lmanorders"
Date:
03 June 2014, 00:19:55
Subject:
Re: INSERT INTO FROM SELECT
Next
From:
Szymon Guz
Date:
04 June 2014, 16:09:43
Subject:
Re: COPY FROM file error: could not open file ... for reading: No such file or directory
Есть вопросы? Напишите нам!
Соглашаюсь с условиями обработки персональных данных
I confirm that I have read and accepted PostgresPro’s
Privacy Policy
.
I agree to get Postgres Pro discount offers and other marketing communications.
✖
×
×
Everywhere
Documentation
Mailing list
List:
all lists
pgsql-general
pgsql-hackers
buildfarm-members
pgadmin-hackers
pgadmin-support
pgsql-admin
pgsql-advocacy
pgsql-announce
pgsql-benchmarks
pgsql-bugs
pgsql-chat
pgsql-cluster-hackers
pgsql-committers
pgsql-cygwin
pgsql-docs
pgsql-hackers-pitr
pgsql-hackers-win32
pgsql-interfaces
pgsql-jdbc
pgsql-jobs
pgsql-novice
pgsql-odbc
pgsql-patches
pgsql-performance
pgsql-php
pgsql-pkg-debian
pgsql-pkg-yum
pgsql-ports
pgsql-rrreviewers
pgsql-ru-general
pgsql-sql
pgsql-students
pgsql-testers
pgsql-translators
pgsql-www
psycopg
Period
anytime
within last day
within last week
within last month
within last 6 months
within last year
Sort by
date
reverse date
rank
Services
24×7×365 Technical Support
Migration to PostgreSQL
High Availability Deployment
Database Audit
Remote DBA for PostgreSQL
Products
Postgres Pro Enterprise
Postgres Pro Standard
Cloud Solutions
Postgres Extensions
Resources
Blog
Documentation
Webinars
Videos
Presentations
Community
Events
Training Courses
Books
Demo Database
Mailing List Archives
About
Leadership team
Partners
Customers
In the News
Press Releases
Press Info
By continuing to browse this website, you agree to the use of cookies. Go to
Privacy Policy
.
I accept cookies