Whilst there is so much attention on the copy command it might be a good
time to chime in with some of the features that it would be nice for
copy to support, as I have run into it's limitations on a number of
projects were the bulk loading of CSV files are a requirement.
1. I would love there to be an option to skip n number of lines - as I
so often come across files which have either column headers or some
other descriptive text on the first or more lines. (like SQL server).
2. I would love if copy supported something similar to the MS Access
schema.ini, where there could be a second file that described the column
and data type mapping of the data that is being loaded.
3. I would love for their to be an option to specify row as well as
field delimiters, so that multi line fields could be bulk loaded as long
as they were delimited by a specified row delimiter that could be more
than one character long.
4. it would be nice if copy could be used to bulk load data in HTML
tables from a URL or file.
5. For that matter there are increasing amounts of data wrapped in XML
tags that are really just serving as field and row delimiters and would
benefit from a bulk load command - perhaps xmlcopy?
I know that there are a plethora of external ways in which flat text
files can be pre parsed or parsed on the fly so that they can be bulk
loaded by a copy command, or exported by the same but to me it seems
really something that should be done inside the DB.
Johan Wehtje
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster