Re: [PATCH] COPY vs \copy HINT

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: Christoph Berg <myon(at)debian(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] COPY vs \copy HINT
Date: 2016-09-01 20:28:28
Message-ID: 6179.1472761708@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Craig Ringer <craig(at)2ndquadrant(dot)com> writes:
> On 12 August 2016 at 16:34, Christoph Berg <myon(at)debian(dot)org> wrote:
>> 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.

A few thoughts on this patch:

1. I don't really think the HINT is appropriate for the not-absolute-path
case.

2. I don't think it's appropriate for all possible cases of AllocateFile
failure either, eg surely not for EACCES or similar situations where we
did find a file. Maybe print it only for ENOENT? (See for example
report_newlocale_failure() for technique.)

3. As for the wording, maybe you could do it like this:

HINT: COPY copies to[from] a file on the PostgreSQL server, not on the
client. You may want a client-side facility such as psql's \copy.

That avoids trying to invent a name for other implementations.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2016-09-01 21:13:16 Re: incomplete removal of not referenced CTEs
Previous Message Simon Riggs 2016-09-01 20:28:20 Re: LOCK TABLE .. DEFERRABLE