Re: How to implement Microsoft Access boolean (YESNO) fieldtype in PostgreSQL ?

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

Предыдущее
От: "Jesper K. Pedersen"
Дата:
Сообщение: How to implement Microsoft Access boolean (YESNO) fieldtype in PostgreSQL ?
Следующее
От: "Jesper K. Pedersen"
Дата:
Сообщение: Re: How to implement Microsoft Access boolean (YESNO)