From: | mike g <mike(at)thegodshalls(dot)com> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: COPY formatting |
Date: | 2004-03-18 04:48:19 |
Message-ID: | 1079585299.12188.24.camel@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Jonathan M. Gardner | 2004-03-18 05:48:25 | Re: Doxygen? |
Previous Message | Joshua D. Drake | 2004-03-18 04:14:32 | Re: COPY formatting |