Re: [PATCH] COPY vs \copy HINT

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Christoph Berg <myon(at)debian(dot)org>, Craig Ringer <craig(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] COPY vs \copy HINT
Date: 2016-08-12 08:41:44
Message-ID: CAMsr+YE5cBopHZwsQHqrjAWpQp0HzU6b-rxApm3TbcRRpw3yAA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12 August 2016 at 16:34, Christoph Berg <myon(at)debian(dot)org> wrote:

> > 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.
>

Ahem, whoops. It's the simple things sometimes...

Attached amended.

> 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.

I don't like it either, but didn't come up with anything better. The
problem is that every driver calls it something different.

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
0001-Emit-a-HINT-when-COPY-can-t-find-a-file.patch text/x-patch 2.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Aleksander Alekseev 2016-08-12 10:18:55 Re: [Patch] New psql prompt substitution %r (m = master, r = replica)
Previous Message Mark Kirkwood 2016-08-12 08:40:13 Re: Btree Index on PostgreSQL and Wiredtiger (MongoDB3.2)