string casting for index usage - Mailing list pgsql-performance

From Michael Adler
Subject string casting for index usage
Date
Msg-id 20040318185237.GA3568@pobox.com
Whole thread Raw
Responses Re: string casting for index usage
List pgsql-performance
In porting an application from v7.2 and v7.3, I noticed that a join on a varchar column and a text column was ignoring
indicesthat were helpful in v7.2. When I explicitly cast the text to a varchar (or set ENABLE_SEQSCAN TO false) the
indexis scanned and it works as efficiently as in v7.2.  

Obviously there were many casting improvements made in 7.3, but our application doesn't exactly see it that way. Is
explicitcasting the only solution (other than schema modification)? I haven't found anything in the documentation on
thissubject. 

Thanks,
Mike

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] fsync method checking
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] fsync method checking