Re: getting postgres to emulate mysql/sqlserver bit datatype - Mailing list pgsql-general

From Tom Lane
Subject Re: getting postgres to emulate mysql/sqlserver bit datatype
Date
Msg-id 22459.1171256321@sss.pgh.pa.us
Whole thread Raw
In response to Re: getting postgres to emulate mysql/sqlserver bit datatype  ("Joshua D. Drake" <jd@commandprompt.com>)
Responses Re: getting postgres to emulate mysql/sqlserver bit datatype  ("Anton Melser" <melser.anton@gmail.com>)
List pgsql-general
"Joshua D. Drake" <jd@commandprompt.com> writes:
> Anton Melser wrote:
>> Is there any way
>> to force pg to accept 1 and 0 for boolean?

> postgres=# insert into bool_test values(1::boolean);
> INSERT 166968558 1
> postgres=# insert into bool_test values(0::boolean);
> INSERT 166968559 1

Possibly Anton is using an old version in which there wasn't a built in
int-to-bool cast?

            regards, tom lane

pgsql-general by date:

Previous
From: "Ian Harding"
Date:
Subject: ERROR: failed to build any 8-way joins
Next
From: Tom Lane
Date:
Subject: Re: ERROR: failed to build any 8-way joins