Attached is a small test extract from the USDA nutrient database.

The problem is that the script won't load the COPY data correctly. This is with CVS HEAD (and 8.1).

It is the 4th column in the table that gives the problem (nutr_no integer). Each of the 3 COPY rows has a different way of specifying a number:

* As an unquoted empty value
* As a quoted number
* As a quoted empty value

Now, I'm specifying "NULL AS ''" in the COPY command but it refuses to recognize the quoted empty value as NULL.

Anyone have any ideas? Is this a bug? The manual even says that using "NULL AS ''" lets you make no distinction between empty and quoted empty values.

Chris

Attachment: test.sql.gz
Description: GNU Zip compressed data

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to