Re: Need help doing a CSV import
От
Tim Landscheidt
Тема
Re: Need help doing a CSV import
Дата
Msg-id
m3hbk1hom8.fsf@passepartout.tim-landscheidt.de
Список
Дерево обсуждения
Re: Need help doing a CSV import Tim Landscheidt <tim@tim-landscheidt.de>
Re: Need help doing a CSV import David Fetter <david@fetter.org>
David Fetter 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
В списке pgsql-general по дате отправления
От: Joshua D. Drake
Дата: