comparison: smallint & 2^extract(dow from date)

Поиск
Список
Период
Сортировка
От Travel Jadoo
Тема comparison: smallint & 2^extract(dow from date)
Дата
Msg-id 1072568138.3776.75.camel@server
обсуждение исходный текст
Список pgsql-general
Hi,

I used the & operator to evaluate whether a certain day would match the
days of operation of a flight.

In v7.2.3 I could use the following to do that:

select 127::smallint & 2^extract(dow from '17-7-2004'::date) != 0 );

In v7.3.4 I get now:

ERROR:  Unable to identify an operator '&' for types 'smallint' and 'double precision'
        You will have to retype this query using an explicit cast

I realise that the docs do say that extract returns a double but how am
I to figure this out ie recast I suppose but how should I do that?

Thanks,
Alfred


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

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: Is my MySQL Gaining ?
Следующее
От: Christopher Murtagh
Дата:
Сообщение: Re: Is my MySQL Gaining ?