6.0.0-beta1
7/5/25

[#9725] vCard (3.0) that contains a photo can't be imported when using postgres
Summary vCard (3.0) that contains a photo can't be imported when using postgres
Queue Turba
Queue Version 3.0.4
Type Bug
State Resolved
Priority 2. Medium
Owners
Requester gsnerf (at) gsnerf (dot) de
Created 03/27/2011 (5214 days ago)
Due
Updated 10/18/2012 (4643 days ago)
Assigned 07/01/2011 (5118 days ago)
Resolved 10/18/2012 (4643 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
10/18/2012 06:09:54 AM Michael Rubinsky Comment #6
State ⇒ Resolved
Reply to this comment
If I'm reading the turba driver code correctly, the blob fields are 
currently ignored in the search.

Marking as resolved in current code.
07/26/2011 10:38:30 AM Jan Schneider Version ⇒ 3.0.4
 
07/01/2011 08:16:25 PM Jan Schneider State ⇒ Assigned
 
05/10/2011 05:43:48 PM torben (at) dannhauer (dot) info Comment #5 Reply to this comment

[Show Quoted Text - 18 lines]
This error occures also during sync, if a mobile device tries to sync 
a newly created contact bakc to horde.

Therfore it is a show stopper for syncing.
04/21/2011 07:12:05 PM gsnerf (at) gsnerf (dot) de Comment #4 Reply to this comment
Any news on this Problem?
04/03/2011 10:58:12 AM gsnerf (at) gsnerf (dot) de Comment #3
New Attachment: ErrorContact.vcf Download
Reply to this comment
Hi there, sorry for the delay was kind of busy this week.
Following this comes the complete error message form the horde log 
including the specific sql statement. I also attached the test vcard 
with which I produced said error. This currently happens with Postgres 
8.4 running, but I guess this will be a problem with other versions as 
well (as has been said in the linked mailing list entries).

Apr 03 12:48:09 HORDE [error] [turba] DB Error: unknown error: SELECT 
object_id, owner_id, object_type, object_members, object_uid, 
object_firstname, object_lastname, object_middlenames, 
object_nameprefix, object_namesuffix, object_alias, object_bday, 
object_photo, object_phototype, object_homestreet, object_homepob, 
object_homecity, object_homeprovince, object_homepostalcode, 
object_homecountry, object_workstreet, object_workpob, 
object_workcity, object_workprovince, object_workpostalcode, 
object_workcountry, object_tz, object_email, object_homephone, 
object_workphone, object_cellphone, object_fax, object_pager, 
object_title, object_role, object_company, object_logo, 
object_logotype, object_category, object_notes, object_url, 
object_freebusyurl, object_pgppublickey, object_smimepublickey FROM 
turba_objects WHERE (owner_id = 'gsnerf@gsnerf.de' AND 
(((object_nameprefix ILIKE '%Postgres%' OR object_nameprefix ILIKE 
'%Error%' OR (object_nameprefix = '' OR object_nameprefix IS NULL)) 
AND (object_firstname ILIKE '%Postgres%' OR object_firstname ILIKE 
'%Error%' OR (object_firstname = '' OR object_firstname IS NULL)) AND 
(object_middlenames ILIKE '%Postgres%' OR object_middlenames ILIKE 
'%Error%' OR (object_middlenames = '' OR object_middlenames IS NULL)) 
AND (object_lastname ILIKE '%Postgres%' OR object_lastname ILIKE 
'%Error%' OR (object_lastname = '' OR object_lastname IS NULL)) AND 
(object_namesuffix ILIKE '%Postgres%' OR object_namesuffix ILIKE 
'%Error%' OR (object_namesuffix = '' OR object_namesuffix IS NULL))) 
AND object_lastname ILIKE '%Postgres Error%' AND object_homephone 
ILIKE '%12345678%' AND object_homestreet ILIKE '%Road
City\\, State 54321%' AND object_email ILIKE '%postgres@error.net%' 
AND object_photo ILIKE '%?PNG

')) [nativecode=ERROR:  operator does not exist: bytea ~~* unknown
ZEILE 2: ...ail ILIKE '%postgres@error.net%' AND object_photo ILIKE '%?P...

03/30/2011 10:58:37 AM Jan Schneider Version ⇒ 2.3.5
 
03/30/2011 10:58:22 AM Jan Schneider Version ⇒
Queue ⇒ Turba
 
03/30/2011 10:58:00 AM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
What exactly is the query that raises this error?
03/27/2011 01:32:37 PM gsnerf (at) gsnerf (dot) de Comment #1
Patch ⇒ No
State ⇒ Unconfirmed
Milestone ⇒
Queue ⇒ Horde Groupware Webmail Edition
Summary ⇒ vCard (3.0) that contains a photo can't be imported when using postgres
Type ⇒ Bug
Priority ⇒ 2. Medium
Reply to this comment
When importing a vcard turba checks if the contained contacts are 
already present in the database so it does not double contacts on 
import. In the sql select statement of this check there is an ILIKE 
comparison on the field 'object_photo' which is of type bytea.
This is not valid in postgres and leads to the following error:

ERROR:  operator does not exist: bytea ~~* unknown

See the following entry in the postgres mailing list on this error: 
http://archives.postgresql.org/pgsql-admin/2009-09/msg00041.php

I suggest to either correctly cast the entry into something that can 
be compared, or simply remove the check for the photo as I don't think 
this is a check that has any value to the task of finding double 
entries.

PS: sorry if this is already reported and fixed in the turba query, I 
couldn't find a similar entry

Saved Queries