From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com> |
Cc: | Shigeru HANADA <hanada(at)metrosystems(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: SQL/MED - file_fdw |
Date: | 2010-12-13 15:59:27 |
Message-ID: | 4D0642DF.2010804@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 12/13/2010 01:31 AM, Itagaki Takahiro wrote:
> On Sat, Dec 11, 2010 at 05:30, Andrew Dunstan<andrew(at)dunslane(dot)net> wrote:
>> On 12/04/2010 11:11 PM, Itagaki Takahiro wrote:
>>> One exports the copy functions from the core, and another
>>> implements file_fdw using the infrastructure.
>> Who is actually going to do this split?
> I'm working for it :-) I extract those functions from copy.c:
>
> - CopyState BeginCopyFrom(Relation rel, const char *filename,
> List *attnamelist, List *options);
> - void EndCopyFrom(CopyState cstate);
> - bool NextCopyFrom(CopyState cstate,
> Datum *values, bool *nulls, Oid *oid);
>
> There was Reset() in file_fdw, but it is not contained in the
> patch. It will be added again if required, but I wonder we might
> need not only reset but also mark/restore a position in a file.
>
Hmm. I don't think that's going to expose enough for what I want to be
able to do. I actually had in mind exposing lower level routines like
CopyReadAttibutesCSV/CopyReadAttributesText and allowing the Foreign
Data Wrapper to manipulate the raw values read (for example from an
irregularly shaped CSV file).
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2010-12-13 16:03:49 | Re: rest of works for security providers in v9.1 |
Previous Message | Tom Lane | 2010-12-13 15:58:52 | Re: initdb failure with Postgres 8.4.4 |