Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 4479114067B5 for ; Sat, 10 Dec 2011 04:26:29 -0400 (AST) Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RZIGJ-0005Wp-IP for pgsql-bugs@postgresql.org; Sat, 10 Dec 2011 08:26:29 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id pBA8QDvL020916; Sat, 10 Dec 2011 03:26:13 -0500 (EST) To: John Lumby cc: pgsql-bugs@postgresql.org Subject: Re: LIKE predicate and ERROR: 42P22: could not determine which collation to use for string comparison - HINT: Use the COLLATE clause ... In-reply-to: References: Comments: In-reply-to John Lumby message dated "Fri, 09 Dec 2011 14:38:34 -0500" Date: Sat, 10 Dec 2011 03:26:13 -0500 Message-ID: <20915.1323505573@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -3.8 (---) X-Archive-Number: 201112/65 X-Sequence-Number: 31876 John Lumby writes: > psql -d proteusdb -c "select count(*) from entity  as e1 where ( e1.association_id IN ( select id from entity as e2 where e2.parent_id=3043508)   OR e1.association_id=3043508 ) and e1.discriminator LIKE 'DEPLOY%'"; > ERROR:  could not determine which collation to use for string comparison > HINT:  Use the COLLATE clause to set the collation explicitly. FWIW, I tried to replicate this on the basis of the limited information you gave, and could not. Can you provide a self-contained test case? regards, tom lane