Nevermind. Apparently from the psql command line the string NULL isinterpreted correctly as a NULL value, but from the DBI interface I'musing, it is not translated correctly as a NULL value, but rather thestring 'NULL'.
I'll try using UNDEF instead.