COPY TO returns "ERROR: could not open file for writing: No such file or directory"

Поиск
Список
Период
Сортировка
От David Noel
Тема COPY TO returns "ERROR: could not open file for writing: No such file or directory"
Дата
Msg-id CAHAXwYDhwxsb9iP9sA0r68R8dHb1iugT7c=wi82wCAqamXaLQw@mail.gmail.com
обсуждение исходный текст
Ответы Re: COPY TO returns "ERROR: could not open file for writing: No such file or directory"
Re: COPY TO returns "ERROR: could not open file for writing: No such file or directory"
Список pgsql-general
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

Running it in pgadmin3 I get the additional output:

SQL state: 58P01

I've tried creating a file named
"pagedump.2014-03-01.to.2014-04-01.copy", changing its permissions,
and changing its owner to pgsql, all with no luck.

The syntax for COPY is:

COPY { table_name [ ( column_name [, ...] ) ] | ( query ) }
    TO { 'filename' | PROGRAM 'command' | STDOUT }
    [ [ WITH ] ( option [, ...] ) ]

...so it *should* be running just fine. I can't figure out why it's not.

FreeBSD. PostgreSQL 9.3.

Has anyone run into this before?


В списке pgsql-general по дате отправления:

Предыдущее
От: Chris Ernst
Дата:
Сообщение: Re: Downtime-free 'alter table set tablespace'
Следующее
От: Alban Hertroys
Дата:
Сообщение: Re: COPY TO returns "ERROR: could not open file for writing: No such file or directory"