Robert James <srobertjames(at)gmail(dot)com> wrote:
> I'm confused: What's the difference between
> col LIKE 'foo%'
> and
> col LIKE f1 || '%'
> ?
The planner knows that 'foo%' doesn't start with a wildcard.
> Either way, it's anchored to the beginning of the string.
Not necessarily.
--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company