Re: SQL/MED - file_fdw - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: SQL/MED - file_fdw
Date
Msg-id 4D505086.4030700@dunslane.net
Whole thread Raw
In response to Re: SQL/MED - file_fdw  (Itagaki Takahiro <itagaki.takahiro@gmail.com>)
List 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

pgsql-hackers by date:

Previous
From: Dave Page
Date:
Subject: Re: Sync Rep for 2011CF1
Next
From: Dimitri Fontaine
Date:
Subject: Re: More extension issues: ownership and search_path