Is there any reason why the backend doesn't cast an unquoted integer to
a boolean value?
Hidden cross-category typecasts are evil. I'd accept this as an explicit cast ('e' in pg_cast) but not automatic.
Alrighty. Do you want an updated patch for the single character tweak or can you futz with it before committing? :)
Also, what about the other direction? Providing a cast in only one direction is pretty inconsistent.
Ah... well, if you want that, I can provide that too. Personally, I could care less about the BOOL->INT direction than INT->BOOL. In C++, any bool value is either 0 or 1 and you can do such weirdness (brokeness?) as:
bool val = false; if (val == 0) { /* blah */ }
Anyway, with Qt, it converts bool values to integers. I think Qt's probably right on this front in that the value 1 should be considered true and 0 should be considered false. My $0.02. -sc
-- Sean Chittenden
---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster