Compare bit and int4

Поиск
Список
Период
Сортировка
От Hafsteinn Þór Hafsteinsson
Тема Compare bit and int4
Дата
Msg-id 5182ED915DE3D211842000600852EB953A8F7F@firebat.nervus.is
обсуждение исходный текст
Список pgsql-novice


Hi, I need to be able to do something like this:

select * from tblTable where bField=1

and bField is defined as 'bit'. I know i can avoid getting this error:

"Unable to identify an operator '=' for types 'bit and 'int4'
 You will have to retype this query using an explicit cast"

by changing the 1 to CAST(1 as bit), but that's not an option (query
will be run on both Access and PostgreSQL).  How can i create
an operator/function to handle this automatically?

thx!

-haffi

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