Subject: | PostgreSQL. Insert error. |
Date: | Thu, 30 Dec 2010 14:49:09 +0300 |
To: | bug-Rose-DB [...] rt.cpan.org |
From: | Alexander Afanasjev <afanasjev.av [...] gmail.com> |
Hello.
I use following software:
perl5 (revision 5 version 10 subversion 1)
Rose-DB-Object-0.793
Rose-DB-0.762
DBD-Pg-2.17.1
Linux localhost 2.6.35-23-generic #41-Ubuntu SMP Wed Nov 24 11:55:36 UTC
2010 x86_64 GNU/Linux
PostgreSQL 8.4.5
I get an error when I try to insert default NULL value in varchar field wich
is either foreign key or might be the NULL. Default value for this field is
'NULL::character varying' (it's generated by Rose::DB::Object::Loader). It's
happens, because DBD::Pg receive string 'NULL::character varying' and, of
course, it's violates foreign key constraint. Of course, I can to change
default value to undef in module wich generated by Rose::DB::Object::Loader,
but it's not desirable for my application. Is it possible to solve this
problem?