Index: openacs-4/packages/contacts/tcl/contacts-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/tcl/contacts-procs-postgresql.xql,v diff -u -r1.17 -r1.18 --- openacs-4/packages/contacts/tcl/contacts-procs-postgresql.xql 3 May 2006 21:27:08 -0000 1.17 +++ openacs-4/packages/contacts/tcl/contacts-procs-postgresql.xql 28 May 2006 01:50:21 -0000 1.18 @@ -42,6 +42,24 @@ + + + select attribute_id + from ams_attributes + where object_type in ( 'party', 'person' ) + and attribute_id in ([template::util::tcl_to_sql_list $attribute_ids]) + and widget is not null + + + + + + select 1 + from acs_rel_types + where rel_type = 'contact_rels_spouse' + + + select name @@ -60,6 +78,31 @@ + + + select CASE WHEN object_id_one = :party_id THEN object_id_two ELSE object_id_one END + from acs_rels, + acs_objects + where rel_type = 'contact_rels_spouse' + and ( object_id_one = :party_id or object_id_two = :party_id ) + and rel_id = object_id + order by creation_date + + + + + + select acs_object__delete(rel_id) + from acs_rels + where ( + ( object_id_one = :party_id and object_id_two = :spouse ) + or + ( object_id_one = :spouse and object_id_two = :party_id ) + ) + and rel_type = 'contact_rels_spouse' + + + select groups.group_id,