]> granicus.if.org Git - postgresql/commit
Add a HINT for client-vs-server COPY failure cases.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 7 Sep 2016 03:55:55 +0000 (23:55 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 7 Sep 2016 03:55:55 +0000 (23:55 -0400)
commit4f405c8ef4704b7fa7fd8ac14a66c5f5d13722c4
tree8191c0e40a4d86f330c05d9da2478ac8690d56ee
parent49eb0fd0972d14014dd3533b1f1bf8c94c899883
Add a HINT for client-vs-server COPY failure cases.

Users often get confused between COPY and \copy and try to use client-side
paths with COPY.  The server then cannot find the file (if remote), or sees
a permissions problem (if local), or some variant of that.  Emit a hint
about this in the most common cases.

In future we might want to expand the set of errnos for which the hint
gets printed, but be conservative for now.

Craig Ringer, reviewed by Christoph Berg and Tom Lane

Discussion: <CAMsr+YEqtD97qPEzQDqrCt5QiqPbWP_X4hmvy2pQzWC0GWiyPA@mail.gmail.com>
src/backend/commands/copy.c