Re: COPY formatting

Поиск
Список
Период
Сортировка
От mike g
Тема Re: COPY formatting
Дата
Msg-id 1079585299.12188.24.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: COPY formatting  ("Joshua D. Drake" <jd@commandprompt.com>)
Список pgsql-hackers
I deal with this daily in a cygwin environment.  I wrote a simple c++
program where I hardcoded the input file name/location and output file
name/location.  I strip the quotation marks out where they are used for
identifying text fields and change the comma's used as CSV's to pipes.

I use a combination of bash scripting to execute the c++ program and
then Perl to execute a stored procedure.  I am new to Perl so I have not
yet considered migrating it all into Perl.

The dos2unix tools in cygwin always messed up the first character of the
first line.

I thought the real issue with the copy function and CSVs was that it did
not like the use of quotations around the fields to identify text
fields.

For a true Windows port handling MS Excel files in their native format
would be a goal I would hope. If your api could handle that then I would
agree with your method.



On Wed, 2004-03-17 at 22:14, Joshua D. Drake wrote:
> >
> >
> >>
> >
> > That is why I suggested providing a pre-written/pre-compiled/installed
> > function for CSV (call it CSV?).  Advanced users could still write
> > their own as people can write many other things if they know their ways.
> >
>
> As someone who just went through a whole truckload of crap getting
> delimited files parsed from MSSQL to PostgreSQL. I believe yes this
> would be  great thing. We ended up using plPython with the CSV module.
>
> Sincerely,
>
> Joshua Drake
>
>
>
> > ---------------------------(end of broadcast)---------------------------
> > TIP 7: don't forget to increase your free space map settings
>
>

В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: COPY formatting
Следующее
От: "Jonathan M. Gardner"
Дата:
Сообщение: Re: Doxygen?