getting postgres to emulate mysql/sqlserver bit datatype

From: "Anton Melser" <melser(dot)anton(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: getting postgres to emulate mysql/sqlserver bit datatype
Date: 2007-02-11 21:42:24
Message-ID: 92d3a4950702111342w59b3724cg5cb691957004681b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
I am trying to port an app to postgres and have come up against a most
annoying problem. The app works with both mysql and sqlserver, who
both seem to have a bit datatype instead of a proper boolean like pg.
Alas, pg won't accept 1 and 0 for boolean... and npgsql won't convert
my numeric(1) into a boolean (and shouldn't either!). Is there any way
to force pg to accept 1 and 0 for boolean? I know it probably isn't
optimal, but hey. If there is a standard way to do this (and no,
rewriting is not an option) I'm all ears.
Cheers
Antoine

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2007-02-11 22:07:59 Re: "no value found for parameter 1" error for query with no parameters
Previous Message Phil Endecott 2007-02-11 21:38:22 "no value found for parameter 1" error for query with no parameters