Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 7E5D92E2B56 for ; Thu, 15 Nov 2007 12:37:54 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 23380-02-2 for ; Thu, 15 Nov 2007 12:37:34 -0400 (AST) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.185]) by postgresql.org (Postfix) with ESMTP id 5449D2E28AD for ; Thu, 15 Nov 2007 12:37:51 -0400 (AST) Received: by nf-out-0910.google.com with SMTP id f5so463956nfh for ; Thu, 15 Nov 2007 08:37:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=I6A8eh4KnB12prNB6FkTtJMKAqFnrAMI0yq79SpuHXg=; b=jA7QVtS3x4JdLQhFufCu8ynqoYxlkUY+caw4g3ujHNRXS90lR2jdAl8rfJ+gswuN6ZOxGvri3HliGtnLc1G11TMVRrEsKWLom0dr1549C/aciZMElU8k/z1ALvKAQKzUgwuwobdDQ7kgSXOFDv6afd4ZspQFzMfsjUubkmKivnc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=EgSG+670kbtdGs4wHQ2DsNjcos5yYWWynj2aBzNSnSRTBaOmPJaSO7QpabKPxKu0zfP7hKaIVEJCtoSOgT3Dw58ZYlnaTlGFTaLYugvoNxonnXJWxUKdSYik1/k8rs5uzFcOIDGS5rcU7Sa6rTbsOMDBxeOoghxEXKfSztIVfVE= Received: by 10.78.185.15 with SMTP id i15mr839630huf.1195144669588; Thu, 15 Nov 2007 08:37:49 -0800 (PST) Received: by 10.78.197.6 with HTTP; Thu, 15 Nov 2007 08:37:49 -0800 (PST) Message-ID: <1d219a6f0711150837i26f35caek3d80fe4a569f6ebb@mail.gmail.com> Date: Thu, 15 Nov 2007 11:37:49 -0500 From: "Chris Hoover" To: "Tom Lane" Subject: Re: any way to make query use index? Cc: "pgsql-admin@postgresql.org Admin" In-Reply-To: <3669.1195143924@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1d219a6f0711150714j6f192548xe4c134a25e5b57b2@mail.gmail.com> <3669.1195143924@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/150 X-Sequence-Number: 27393 On Nov 15, 2007 11:25 AM, Tom Lane wrote: > > Here is the table definition: > > CREATE TABLE rev_code_desc > > ( > > rev_code character(4) NOT NULL, > If changing the queries seems impractical, you could add an index on > rev_code::text, or reconsider the choice of column type. > > regards, tom lane > how would you create this index? create index rev_code_text_idx on rev_code_desc(rev_code::text) fails complaining "ERROR: syntax error at or near "::"" Thanks Chris