From: Jesper K. Pedersen <jkp@solnet.homeip.net>
To: pgsql-sql@postgresql.org
Subject: Re: How to implement Microsoft Access boolean (YESNO)
Date: Sun, 22 Jan 2006 22:13:28 +0100
Message-ID: <20060122221328.433038a9@io.solnet> (raw)
In-Reply-To: <22008.1137962771@sss.pgh.pa.us>
References: <20060122211351.371f20d8@io.solnet>
<22008.1137962771@sss.pgh.pa.us>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: jkp@solnet.homeip.net
Subject: Re: How to implement Microsoft Access boolean (YESNO)
In-Reply-To: <20060122221328.433038a9@io.solnet>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox