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

From Tom Lane
Subject Re: How to implement Microsoft Access boolean (YESNO) fieldtype in PostgreSQL ?
Date
Msg-id 22008.1137962771@sss.pgh.pa.us
Whole thread Raw
In response to How to implement Microsoft Access boolean (YESNO) fieldtype in PostgreSQL ?  ("Jesper K. Pedersen" <jkp@solnet.homeip.net>)
Responses Re: How to implement Microsoft Access boolean (YESNO)  ("Jesper K. Pedersen" <jkp@solnet.homeip.net>)
List pgsql-sql
"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).
        regards, tom lane


pgsql-sql by date:

Previous
From: "Jesper K. Pedersen"
Date:
Subject: How to implement Microsoft Access boolean (YESNO) fieldtype in PostgreSQL ?
Next
From: "Jesper K. Pedersen"
Date:
Subject: Re: How to implement Microsoft Access boolean (YESNO)