Re: How to implement Microsoft Access boolean (YESNO)
От | Jesper K. Pedersen |
---|---|
Тема | Re: How to implement Microsoft Access boolean (YESNO) |
Дата | |
Msg-id | 20060122221328.433038a9@io.solnet обсуждение исходный текст |
Ответ на | Re: How to implement Microsoft Access boolean (YESNO) fieldtype in PostgreSQL ? (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: How to implement Microsoft Access boolean (YESNO)
|
Список | 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 по дате отправления: