Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 47E671EE3E82 for ; Mon, 12 Dec 2011 17:39:07 -0400 (AST) Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RaDaV-0004dj-HG for pgsql-bugs@postgresql.org; Mon, 12 Dec 2011 21:39:07 +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 pBCLcrwT012192; Mon, 12 Dec 2011 16:38:54 -0500 (EST) To: John Lumby cc: pgsql bugs 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: , <20915.1323505573@sss.pgh.pa.us> Comments: In-reply-to John Lumby message dated "Sun, 11 Dec 2011 19:55:32 -0500" Date: Mon, 12 Dec 2011 16:38:53 -0500 Message-ID: <12191.1323725933@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -4.2 (----) X-Archive-Number: 201112/84 X-Sequence-Number: 31895 John Lumby writes: > Sorry about that,   here is a script to demonstrate using a much simpler example. > It presumes linux and that there is a bash shell at /bin/bash. > You should see table created and loaded (takes a few minutes),   then successful query explain and run, > then create index and re-run the explain (now uses index) and query (now fails) Hmm ... I tried this script on both HEAD and 9.1, and see no failure. Possibly it requires some non-default configuration setting to show the problem? Also, are you certain your database is ending up with LC_COLLATE and LC_CTYPE set to "C"? I am not sure that createdb pays attention to those as locale settings. regards, tom lane