2016-02-22 18:00 GMT+02:00 Thomas Kellerer <spam_ea...@gmx.net>:

> I assume that this has to do with the fact that char(n) is blank padded to
> 20 character.
>

Yes, this was my thought too, but I do not understand what is going on in
details.


To be able to correctly compare that to a text value, sn_c has to be casted
> to text and then the index (which contains blank padded values) can not be
> used any more.
>

Well, for `varchar` type Postgres is able to do `varchar` -> `bpchar` cast
for my constant. I do not understand why for `text` it cannot and casts
column instead.


-- 
Victor Y. Yegorov

Reply via email to