X-Original-To: pgsql-admin@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 759E54758E6 for ; Sun, 23 Feb 2003 14:47:49 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 05982-06 for ; Sun, 23 Feb 2003 14:47:38 -0500 (EST) Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id B777647592C for ; Sun, 23 Feb 2003 14:45:46 -0500 (EST) Received: by news.hub.org (Postfix, from userid 8) id A1B1D43A896; Sun, 23 Feb 2003 14:45:46 -0500 (EST) From: "Gaetano Mendola" X-Newsgroups: comp.databases.postgresql.admin Subject: Re: index not used in ( varchar = text ) Date: Sun, 23 Feb 2003 20:45:46 +0100 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 40 Message-ID: References: <1046023648.9730.23.camel@localhost.localdomain> Reply-To: "Gaetano Mendola" X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 To: pgsql-admin@postgresql.org X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/364 X-Sequence-Number: 7562 ----- Original Message ----- From: "Will LaShell" Newsgroups: comp.databases.postgresql.admin Sent: Sunday, February 23, 2003 7:02 PM Subject: Re: index not used in ( varchar = text ) > 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 Of course that example was a semplification of a real situation: .......... my_login ALIAS FOR $1; SELECT * FROM user_login WHERE login = my_login; .................. and $1 is of type TEXT. I had the same function on Postgres 7.2.3 and was working correctly. Ciao Gaetano