Re: SQL/MED - file_fdw

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Itagaki Takahiro <itagaki.takahiro@gmail.com>
Cc: Shigeru HANADA <hanada@metrosystems.co.jp>, Andrew Dunstan <andrew@dunslane.net>, Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@postgresql.org
Date: 2010-12-19T03:45:15Z
Lists: pgsql-hackers
On Sat, Dec 18, 2010 at 10:43 PM, Itagaki Takahiro
<itagaki.takahiro@gmail.com> wrote:
> On Sun, Dec 19, 2010 at 12:18, Robert Haas <robertmhaas@gmail.com> wrote:
>> I'm sort of suspicious of the fact that BeginCopyTo() is a shell
>> around BeginCopy() while BeginCopyFrom() does a whole bunch of other
>> stuff.  I haven't grokked what the code is doing here well enough to
>> have a concrete proposal though...
>
> I added Begin/EndCopyTo() just because the internal code looks
> symmetric. The proposal doesn't change behaviors of COPY commands
> at all. It just exports a part of COPY FROM codes as "File Reader"
> so that the file_fdw external module can reuse the code. I believe
> we have the conclusion that we should avoid code duplication
> to read files in the prior discussion.

I'm not questioning any of that.  But I'd like the resulting code to
be as maintainable as we can make it.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company