On Apr 15, 2005, at 4:02 PM, Clay Dowling wrote:
James Berry wrote:It would be useful to use bound parameters in such cases.
Might it make sense to coerce the value at runtime into a string value in such a case? I believe a similar restriction (ticket #1096: limit and offset) was recently lifted to allow bound parameters in those cases, where only an integer is allowed.
In this case we're dealing with a bit of code that is probably not frequently executed. snprintf is probably your friend here, at least for the time being.
I'm not the OP, but I'm simply suggesting that it would be, in general, really nice if the architecture could allow bound parameters for many more of these cases. Not to the point of keyword substitution (that would change meaning of a statement) but for any parameter.
Yes, snprintf and friends can be used, but the ability to use bound parameters can really clean up code, and help also to separate SQL snippets from logic code.
It's not a must have, but a nice nicety.
-jdb