"Roberto Icardi" <roberto_icardi@xxxxxxxxxxx> writes: > Everything works perfectly... BUT the query returns always 0 rows affected, > even if one record is inserted or deleted in friends_hobbies...why?? The rules for this are explained here: http://www.postgresql.org/docs/8.2/static/rules-status.html If you're replacing an update with a delete you're not going to get far with that. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq