Dan Sugalski <[EMAIL PROTECTED]> writes:I'd figure, though, that since the parameters are being passed into PQexecParams basically to get them out of band so I don't have to deal with escaping, quoting, and suchlike things, that the optimizer would look at things *after* the substitution was done.
You'd figure wrong :-(. The present mechanism for the LIKE-to-index optimization requires the LIKE pattern to be a pure, unadulterated constant.
Well. Darn.
Would I regret it if I asked where in the source this lies so I could go fix it?
--
Dan
--------------------------------------it's like this------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk
---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match