Skip site navigation (1) Skip section navigation (2)

Re: How to implement Microsoft Access boolean (YESNO)

From: "Jesper K(dot) Pedersen" <jkp(at)solnet(dot)homeip(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: How to implement Microsoft Access boolean (YESNO)
Date: 2006-01-22 21:13:28
Message-ID: 20060122221328.433038a9@io.solnet (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
On Sun, 22 Jan 2006 15:46:11 -0500
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> "Jesper K. Pedersen" <jkp(at)solnet(dot)homeip(dot)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

In response to


pgsql-sql by date

Next:From: Achilleus MantziosDate: 2006-01-23 10:57:11
Subject: performance change
Previous:From: Tom LaneDate: 2006-01-22 20:46:11
Subject: Re: How to implement Microsoft Access boolean (YESNO) fieldtype in PostgreSQL ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group