Re: How to implement Microsoft Access boolean (YESNO) - Mailing list pgsql-sql

From Jesper K. Pedersen
Subject Re: How to implement Microsoft Access boolean (YESNO)
Date
Msg-id 20060122221328.433038a9@io.solnet
Whole thread Raw
In response to Re: How to implement Microsoft Access boolean (YESNO) fieldtype in PostgreSQL ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: How to implement Microsoft Access boolean (YESNO)  (Greg Stark <gsstark@mit.edu>)
List pgsql-sql
On Sun, 22 Jan 2006 15:46:11 -0500
Tom Lane <tgl@sss.pgh.pa.us> wrote:

> "Jesper K. Pedersen" <jkp@solnet.homeip.net> writes:
> > I am have some difficulties converting the Microsoft field of type
> > YESNO (which is a simple boolean true/false) to something that is
> > compatible with PostgreSQL.
> 
> Assume that we have no idea what that is ;-).  What is the I/O format
> MSSQL uses for this datatype?  Is YESNO actually the name of the type?
> 
> If the problem is that Access is looking for that specific type name,
> you could probably fake it out by creating a domain:
> 
>     create domain yesno as boolean;
>     create table foo (mycol yesno);
> 
> This will only work if the I/O format is 't' and 'f', though.
> Otherwise you'll need to make the domain be over a type with
> suitable I/O format (perhaps integer or text will work).
> 

Having checked the I/O format it seems that MS Access exports the
values of a YESNO field as 0 and 1
I have tried the workaround with creating a domain for various
datatypes but it wasnt passed through the odbc layer (have tried both
with Linux/PostgreSQL and native Microsoft PostgreSQL 8.1 server both
with the same result) :-\

Best regards
Jesper K. Pedersen


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: How to implement Microsoft Access boolean (YESNO) fieldtype in PostgreSQL ?
Next
From: Achilleus Mantzios
Date:
Subject: DBMirror.pl performance change