Re: [PATCH] COPY vs \copy HINT - Mailing list pgsql-hackers

From Christoph Berg
Subject Re: [PATCH] COPY vs \copy HINT
Date
Msg-id 20160812083436.lprlra2zh2w4mvmk@msg.df7cb.de
Whole thread Raw
In response to [PATCH] COPY vs \copy HINT  (Craig Ringer <craig@2ndquadrant.com>)
Responses Re: [PATCH] COPY vs \copy HINT  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-hackers
Re: Craig Ringer 2016-08-12 <CAMsr+YEqtD97qPEzQDqrCt5QiqPbWP_X4hmvy2pQzWC0GWiyPA@mail.gmail.com>
> I think we should emit a HINT here, something like:
>
> ERROR:  could not open file "D:\CBS_woningcijfers_2014.csv" for reading: No
> such file or directory'
> HINT:  Paths for COPY are on the PostgreSQL server, not the client. You may
> want psql's \copy or a driver COPY ... FROM STDIN wrapper

+1 on the idea.

> postgres=# COPY x TO '/root/nopermissions';
> ERROR:  could not open file "/root/nopermissions" for writing: Permission
> denied
> HINT:  Paths for COPY are on the PostgreSQL server, not the client. You may
> want psql's \copy or a driver COPY ... FROM STDIN wrapper

TO STDOUT.

Also, I vaguely get what you wanted to say with "a driver ...
wrapper", but it's pretty nonsensical if one doesn't know about the
protocol details. I don't have a better suggestion now, but I think it
needs rephrasing.

Christoph

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: new autovacuum criterion for visible pages
Next
From: Mark Kirkwood
Date:
Subject: Re: Btree Index on PostgreSQL and Wiredtiger (MongoDB3.2)