Re: COPY TO returns "ERROR: could not open file for writing: No such file or directory"
В списке pgsql-general по дате отправления:
| От | Alban Hertroys |
|---|---|
| Тема | Re: COPY TO returns "ERROR: could not open file for writing: No such file or directory" |
| Дата | |
| Msg-id | 656145E5-3C5A-4D9C-A940-51117D0B2EDB@gmail.com обсуждение |
| Ответ на | COPY TO returns "ERROR: could not open file for writing: No such file or directory" (David Noel <david.i.noel@gmail.com>) |
| Список | pgsql-general |
On 24 May 2014, at 8:21, David Noel <david.i.noel@gmail.com> wrote: > COPY (SELECT * FROM page WHERE "PublishDate" between '2014-03-01' and > '2014-04-01') TO > '/home/ygg/sql/backup/pagedump.2014-03-01.to.2014-04-01.copy'; > > gives me: > > ERROR: could not open file > "/home/ygg/sql/backup/pagedump.2014-03-01.to.2014-04-01.copy" for > writing: No such file or directory > FreeBSD. PostgreSQL 9.3. > > Has anyone run into this before? Two possibilities I can think of: 1. You’re not writing that file on the database server. 2. It’s a permission issue. Can you cd to that directory as user pgsql and create a file there? # su - pgsql # cd /home/ygg/sql/backup # touch test It’s possible that you lack execute permission on the symlink from /home to /usr/home, for example. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll find there is no forest.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера