X-Original-To: pgsql-admin@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id DA12D47590C for ; Sun, 23 Feb 2003 13:02:48 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 90559-06 for ; Sun, 23 Feb 2003 13:02:38 -0500 (EST) Received: from relay1.uswest.net (relay3.uswest.net [63.226.138.11]) by postgresql.org (Postfix) with SMTP id 0D46E475AD4 for ; Sun, 23 Feb 2003 12:59:15 -0500 (EST) Received: (qmail 81313 invoked by uid 0); 23 Feb 2003 17:59:14 -0000 Received: from unknown (HELO ?10.0.0.17?) (216.161.210.99) by relay3.uswest.net with SMTP; 23 Feb 2003 17:59:14 -0000 Subject: Re: index not used in ( varchar = text ) From: Will LaShell To: Gaetano Mendola Cc: pgsql-admin@postgresql.org In-Reply-To: References: Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 (1.0.8-10) Date: 23 Feb 2003 11:07:27 -0700 Message-Id: <1046023648.9730.23.camel@localhost.localdomain> Mime-Version: 1.0 X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/363 X-Sequence-Number: 7561 Why would you want to cast that to text, if your field is a varchar? I wouldn't think you would have to cast it at all, or if you do, cast it to a varchar. Curious, WIll On Sat, 2003-02-22 at 10:55, Gaetano Mendola wrote: > Hi all, > > why in Postgresql 7.3.2 in a select like: > > SELECT * > FROM user_login > WHERE login = 'FOO'::text; > > and login is a VARCHAR the index on login > is not used anymore ? > > > Ciao > Gaetano > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org