David Fetter <david@fetter.org> wrote:
> [...]
>> Another option is a small Perl script or something similar
>> that connects to both the FoxPro and the PostgreSQL database
>> and transfers the data with parameterized "INSERT". The ad-
>> vantage of this is that you have tight control of charsets,
>> date formats, EOL conventions & Co. and do not have to won-
>> der whether this and that file is in this and that stage of
>> the conversion process, the disadvantage is obviously that
>> you lose any speed benefit of bulk "COPY".
> You can do your transformations and hand the stream off to the COPY
> interface. See the pg_putcopydata() section of the DBD::Pg manual for
> examples. :)
Eh, yes, but then you have to do all the escaping yourself
and the simplicity of "get values A, B, C from this connec-
tion and pass it onto that" goes away :-). Now if there'd be
a "pg_putcopydata(array of arrayrefs)" ... :-).
Tim