[dev] Error in preferences/database?

Keith A. Chayer kchayer@bbcnet.edu
Mon, 13 Nov 2000 16:11:56 -0600 (CST)


Quoting Michael Bull <mbull@uoguelph.ca>:

> >My tree is always up-to-date, I only use MySQL however, not Postgres.
> >
> >It sounds like you've set your pref_name to be the primary key
> >for the preferences table, which is wrong - it should be both uid
> >and pref_name together.
> 
> That was it.  *thunk*   I changed the primary key on the table and it
> seems 
> to be working.  I'll let you all know if I run into any further problems
> 
> with it.   So far though, everything seems to be working well.

Mine was already set this way, and I'm getting the same error (Warning: 
PostgreSQL query failed: ERROR: Cannot insert a duplicate key into a unique 
index in DB/pgsql.php on line 163).  I get the error whenever I try to change 
any value in the preferences in IMP 2.3 (CVS checked out less than 20 minutes 
ago).  For instance, I can enter my full name, but whenever I try to change one 
of those, I get that error.  I set my database up according to 
horde/imp/scripts/db/prefs.sql (save the pref_value line: I had to change it 
to "pref_value text," as Postgres didn't like the "null" after the word 
"text") and I am using Postgres 6.5.3.  If I do a list of that database, here is 
the output:

 +------------------+----------------------------------+----------+
 |  Owner           |             Relation             |   Type   |
 +------------------+----------------------------------+----------+
 | postgres         | auth                             | table    |
 | postgres         | auth_pkey                        | index    |
 | postgres         | user_webmail_prefs               | table    |
 | postgres         | user_webmail_prefs_pkey          | index    |
 +------------------+----------------------------------+----------+

I'd like to get this resolved also but the above suggestion doesn't work/apply 
to me...?

Thanks.

..Keith

--
"I consider this a day well seized.  Tomorrow we'll seize the day AND conquer
it!"  -Calvin, "Calvin and Hobbes"
--