On Mon, 20 Dec 2010 20:42:38 +0900
Itagaki Takahiro <itagaki.takah...@gmail.com> wrote:
> On Sun, Dec 19, 2010 at 12:45, Robert Haas <robertmh...@gmail.com> wrote:
> > I'm not questioning any of that.  But I'd like the resulting code to
> > be as maintainable as we can make it.
> 
> I added comments and moved some setup codes for COPY TO to BeginCopyTo()
> for maintainability. CopyTo() still contains parts of initialization,
> but I've not touched it yet because we don't need the arrangement for now.

Attached is the revised version of file_fdw patch.  This patch is
based on Itagaki-san's copy_export-20101220.diff patch.

Changes from previous version are:

* file_fdw uses CopyErrorCallback() as error context callback routine
in fileIterate() to report error context.  "CONTEXT" line in the
example below is added by the callback.

    postgres=# select * From csv_tellers_bad;
    ERROR:  missing data for column "bid"
    CONTEXT:  COPY csv_tellers_bad, line 10: "10"
    postgres=#

* Only superusers can change table-level file_fdw options.  Normal
user can't change the options even if the user was the owner of the
table.  This is for security reason.

Regards,
--
Shigeru Hanada

Attachment: file_fdw-20101221.patch.gz
Description: Binary data

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to