Re: getting postgres to emulate mysql/sqlserver bit datatype

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: getting postgres to emulate mysql/sqlserver bit datatype
Дата
Msg-id 22459.1171256321@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: getting postgres to emulate mysql/sqlserver bit datatype  ("Joshua D. Drake" <jd@commandprompt.com>)
Ответы Re: getting postgres to emulate mysql/sqlserver bit datatype  ("Anton Melser" <melser.anton@gmail.com>)
Список pgsql-general
"Joshua D. Drake" <jd@commandprompt.com> writes:
> Anton Melser wrote:
>> Is there any way
>> to force pg to accept 1 and 0 for boolean?

> postgres=# insert into bool_test values(1::boolean);
> INSERT 166968558 1
> postgres=# insert into bool_test values(0::boolean);
> INSERT 166968559 1

Possibly Anton is using an old version in which there wasn't a built in
int-to-bool cast?

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: "Ian Harding"
Дата:
Сообщение: ERROR: failed to build any 8-way joins
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ERROR: failed to build any 8-way joins