Re: SQL/MED - file_fdw

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
Cc: Noah Misch <noah(at)leadboat(dot)com>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql-hackers(at)postgresql(dot)org, hanada(at)metrosystems(dot)co(dot)jp
Subject: Re: SQL/MED - file_fdw
Date: 2011-02-07 20:05:26
Message-ID: 4D505086.4030700@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 02/07/2011 01:39 AM, Itagaki Takahiro wrote:
>
>
>> file_fdw uses CopyFromErrorCallback() to give errors the proper context. The
>> function uses template strings like "COPY %s, line %d", where %s is the name of
>> the relation being copied. Presumably file_fdw and other features using this
>> API would wish to customize that error message prefix, and the relation name
>> might not be apropos at all. How about another argument to BeginCopyFrom,
>> specifying an error prefix to be stashed in the CopyState?
> I changed "COPY %s, .." to "relation %s, ..." because the first string is
> the relation name anyway. We could have another prefix argument, but I think
> it has little information for errors.
>
> We also have many "COPY" in other messages, but they won't be used actually
> because the are messages for invalid arguments and file_fdw will have own
> validater function. All invalid arguments will be filtered in CREATE commands.

These changes have broken the regression tests. The attached patches
(one for the core regression tests and one for file_fdw) fix that.

But I don't know that your change is terribly helpful. I rather like
Noah's idea better, if we need to make a change.

cheers

andrew

Attachment Content-Type Size
copyapi-regressionfix-file_fdw.patch text/x-patch 618 bytes
copyapi-regressionfix-core.patch text/x-patch 4.2 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Page 2011-02-07 20:06:18 Re: Sync Rep for 2011CF1
Previous Message Robert Haas 2011-02-07 19:59:12 Re: Sync Rep for 2011CF1