Re: index not used in ( varchar = text )

From: Will LaShell <will(at)lashell(dot)net>
To: Gaetano Mendola <mendola(at)bigfoot(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: index not used in ( varchar = text )
Date: 2003-02-23 18:07:27
Message-ID: 1046023648.9730.23.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Gaetano Mendola 2003-02-23 19:45:46 Re: index not used in ( varchar = text )
Previous Message Tom Lane 2003-02-23 16:58:48 Re: \d tablename with psql over slow links...