comparison: smallint & 2^extract(dow from date) - Mailing list pgsql-general

From Travel Jadoo
Subject comparison: smallint & 2^extract(dow from date)
Date
Msg-id 1072568138.3776.75.camel@server
Whole thread Raw
List 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 by date:

Previous
From: Dave Cramer
Date:
Subject: Re: Is my MySQL Gaining ?
Next
From: Christopher Murtagh
Date:
Subject: Re: Is my MySQL Gaining ?