Hi,

I'm trying to use avpops module, but I'm facing the following error:

 0(8178) PG[367] submit_query query 'insert into usr_preferences
(uuid,attribute,value,type,username,domain ) values
('test','avpname','test',0,'','')', result 'ERROR:  duplicate key
violates unique constraint "usr_preferences_pkey"

It seems to be caused by the username and domain parameters being
empty strings, since the usr_preferences table has this PK constraint:
 "usr_preferences_pkey" primary key, btree (attribute, username,
"domain")

The avpops module is configured like this:
modparam("avpops", "avp_url", "postgres://xpto:[EMAIL PROTECTED]/xpto")
modparam("avpops", "avp_table", "usr_preferences")
modparam("avpops","use_domain",1)
modparam("avpops", "avp_aliases", "avpalias=s:avpname")

And I'm simply doing:
avp_printf("s:avpname", "test");
avp_db_store("$avpalias/uuid", "s:avpname");

What may be missing? Maybe the usr_preferences table should not have
this PK when using UUID-based AVP identification...

JF

_______________________________________________
Users mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/users

Reply via email to