Hi,
I just changed the PK definition to allow definition of same AVP but
with multiples values. Also to speed up the lookup indexes based on uuid
or username/domain were added.
regards,
bogdan
JF wrote:
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:xpto@127.0.0.1/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
Users(a)openser.org
http://openser.org/cgi-bin/mailman/listinfo/users