Menu

#14 Unable to change a dav property

open
nobody
None
5
2011-07-26
2011-07-26
Jan Mate
No

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).

Discussion

  • Jan Mate

    Jan Mate - 2011-07-27

    The previously removed select was not unused. The new patch fixes this.

     
  • Jan Mate

    Jan Mate - 2011-07-27
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.