"Ace" <a_s@poczta.fm> writes:
> I've upgraded my DB to 7.3.1 from 7.2. The following update causes the SEQ
> SCAN instead of INDEX SCAN (in 7.2 there was no bug like that):
I don't believe that. No version of Postgres would have generated an
index scan on this query, because you've got a type mismatch: ident
is declared char(50) but the result of the trim()||trim() expression
will be of type text.
I'd recommend changing all the column datatypes from char(N) to text.
Then you could get rid of the trim() calls, and save yourself a bunch
of disk space too. Those trailing spaces aren't free.
regards, tom lane