[ic] Postgres + Debian error

Peter peter at pajamian.dhs.org
Wed Jan 3 05:55:09 EST 2007


On 01/03/2007 02:47 AM, Rene Hertell wrote:
> Jon Jensen wrote:
>> Given the error message:
>>
>>> set_row error as called by Vend::Table::DBI: DBD::Pg::db do failed:
>>> ERROR:  null value in column "password" violates not-null constraint
>> it sure sounds to me like a simple problem of your Interchange table
>> import trying to put a NULL entry in the password field. Why don't you
>> make "password" allow NULL and see if it stops complaining? If so, then
>> you'll know what's wrong and can try to find out where the NULL password
>> is coming from.
> 
> Yep, That was it. Removing the Not NULL worked..
> 
> But I wonder why it gave me that error, because removing the "not null"
> saved that password anyway in the password column as expected...

I think that for some reason it creates the row in the db with just the
username then uses an UPDATE to fill in the rest of the fields.
postgresql allows you to have a default of null for a NOT NULL field but
if you try to do an INSERT without specifying a value for that field
then you will end up with a NULL value error like you got.  Another way
to fix the problem would have been to change the password column to
default to '' (empty string) instead of NULL.  Actually changing it that
way will help with troubleshooting as well because it will tell us if
the field is being set to NULL by default or explicitly.

Peter



More information about the interchange-users mailing list