When trying to update a dav property, I get an error:
davical: LOG: principals/users/cars/hilux/: Query: QF: SQL error "42804" - ERROR: column "changed_by" is of type integer but expression is of type name LINE 1: ...on, property_name, property_value ) VALUES( path, user, curr... ^ HINT: You will need to rewrite or cast the expression. QUERY: INSE
davical: LOG: principals/users/cars/hilux/: Query: QF: RT INTO property ( dav_name, changed_by, changed_on, property_name, property_value ) VALUES( path, user, current_timestamp, key, value ) CONTEXT: PL/pgSQL function "set_dav_property" line 16 at SQL statement"
davical: LOG: principals/users/cars/hilux/: Query: QF: SELECT set_dav_property( :dav_name, :user_no, :tag::text, :value::text)
davical: LOG: principals/users/cars/hilux/: Query: QF: ":dav_name" => "/cars/hilux/"
davical: LOG: principals/users/cars/hilux/: Query: QF: ":user_no" => "1023"
davical: LOG: principals/users/cars/hilux/: Query: QF: ":tag" => "http://apple.com/ns/ical/:calendar-color"
davical: LOG: principals/users/cars/hilux/: Query: QF: ":value" => "#711A76"
The included patch fix this problem by adding explicit casting for changed_by values. I also removed one unused select and its temporary variable (also unused).
The previously removed select was not unused. The new patch fixes this.