Forum OpenACS Development: Re: very annoying gotcha overloading functions in nspostgres...

Collapse
Posted by russ m on
I wouldn't think of going without nspostgres' faux-bind variables, the benefits are large and obvious. I wondered briefly if using the new bind variable support in postgres (libpq's PQexecParams()) would help, and realised that on it's own it wouldn't.

The one thing that sprung to mind, and I'm not entirely convinced it would be worth the effort, is to give nspostgres enough brains to work out the likely type of each bind variable and treat it appropriately - a bunch of regexps or some such to match against permissable formats of PG's known datatypes. On the plus side it would remove this gotcha and be a useful step towards shifting from PQexec()to PQexecParams(), on the minus side it would slow nspostgres down, need to be kept in sync with any datatype changes in PG, and requires programmer time that I don't have spare... :)

/me adds entry to bottom third of TODO list...