[dev] Error in preferences/database?

Max Kalika max@the-triumvirate.net
Mon, 13 Nov 2000 16:43:56 -0800


Quoting Michael Bull <mbull@uoguelph.ca>:

> It sounds as if the code is trying to do an INSERT instead of an UPDATE?

It first tries an insert and if that fails it tries an update.  I think that is 
the quickest way to find out if the record already exists.  I have traced the 
problem back to the DB/pgsql.php PEAR driver.  It doesn't quietly handle the 
query whereas the mysql driver does.  You may want to contact the php folk 
about that.  For now you can either stick in an '@' sign before the pg_exec 
call in DB/pgsql.php (i.e. on line 163 and 194 instead of pg_exec make it 
@pg_exec) or switch to using the bundled pgsql.php Prefs driver in imp. (i.e. 
$conf['prefs']['driver'] = 'pgsql'.


--mk23