Monday, January 21, 2008

Postgresql's inadequate COPY comand

Who else is bugged by PostgreSQL's COPY command? This thing is finicky as hell and it lacks any advanced options available in most DBMS import utilities.

One thing that really bugs me is the utilities inability to accept missing data for fields at the end of the file as NULLs. Ideally, any decent utility would assume NULLs and import the data ( like mysql ) or provide an option to allow NULLs in trailing columns( like Oracle ). Bummer...PostgreSQL does neither. You are stuck writing pre-import utilities in perl/sed/tr/awk..etc to cleanup the data and provide delimiters before your provide it to PostgreSQL COPY. In the end, more time needed to load data in PostgreSQL than any other DBMS.

No comments:

About Me

California, United States