Tom Lane <[EMAIL PROTECTED]> writes:

> Greg Stark <[EMAIL PROTECTED]> writes:
> > "Jesper K. Pedersen" <[EMAIL PROTECTED]> writes:
> >> Having checked the I/O format it seems that MS Access exports the
> >> values of a YESNO field as 0 and 1
> 
> > If only Postgres's boolean type were as helpful.
> 
> There's a cast to int in 8.1, and you can roll-your-own easily in prior
> releases ...

The annoying thing about is that in just about any client language you'll get
't' and 'f' by default and both will evaluate to false. So any user who tries
to do things the obvious way like this will get a surprise:

 if ($db->query("select canlogin from users where userid = ?",$userid)) {
   ...
 }

Is there an implicit cast from ints? So if I pass a 0 or 1 argument for a
boolean parameter now it'll work? That definitely didn't work in the past.

-- 
greg


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to