Re: Regarding BITs vs. INTs - Mailing list pgsql-general

From Stephan Szabo
Subject Re: Regarding BITs vs. INTs
Date
Msg-id 20040227170913.C97148@megazone.bigpanda.com
Whole thread Raw
In response to Regarding BITs vs. INTs  (Bill Moran <wmoran@potentialtech.com>)
Responses Re: Regarding BITs vs. INTs  (Bill Moran <wmoran@potentialtech.com>)
List pgsql-general
On Fri, 27 Feb 2004, Bill Moran wrote:

> I hadn't really looked at this until I started having problems with it.
>
> For those who haven't been following along, I'm converting an application
> originally written in MSSQL to Postgres.
>
> I'm a little startled by how BIT fields are handled differently.  Apparently,
> MSSQL converts freely between BIT and INT.  Those who know, already know that
> Postgres doesn't do this.

No, but IIRC, it does allow casts between them, it just requires that you
explicitly mark that you want to cast the value.  If you really want to,
you could consider changing those casts into implicit casts and see if
that does what you want.

pgsql-general by date:

Previous
From: "Jim Wilson"
Date:
Subject: Re: Restoring a table with a different name
Next
From: Bill Moran
Date:
Subject: Re: Regarding BITs vs. INTs