[ic] Postgres + Debian error
peter at pajamian.dhs.org
Mon Jan 8 15:31:37 EST 2007
On 01/08/2007 12:14 PM, Peter wrote:
> On 01/08/2007 07:20 AM, Rene Hertell wrote:
>> Peter wrote:
>>> 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.
>> I tried to figure out if this was the case, but i could not locate the
>> routine that would have done that..
> ALTER TABLE userdb ALTER password SET DEFAULT '';
Also, should mention that it helps to do this as well in userdb.pgsql:
Database userdb COLUMN_DEF "password=varchar(64) DEFAULT '' NOT NULL"
That way IC will recreate the table correctly in the future.
More information about the interchange-users