Re: getting postgres to emulate mysql/sqlserver bit datatype

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: Anton Melser <melser(dot)anton(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: getting postgres to emulate mysql/sqlserver bit datatype
Date: 2007-02-12 04:58:41
Message-ID: 22459.1171256321@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Joshua D. Drake" <jd(at)commandprompt(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-02-12 05:40:31 Re: ERROR: failed to build any 8-way joins
Previous Message Ian Harding 2007-02-12 04:20:24 ERROR: failed to build any 8-way joins