bitwise again

From: Alexander Lohse <al(at)humantouch(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: bitwise again
Date: 2001-04-02 14:46:06
Message-ID: p05010400b6ee3e19eba1@[192.168.0.144]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I am having serious troubles to move my DBs from MySQL to Postgres.

In MySQL I use following bitwise operation on an INT field:

$q = "select id from my_tbl where aid & 2";

In Postgres I tried the same, but I found no working solution.

My basic questions:

Is it better(or even possible) to use bitwise operator on an int4
field or shall I prefer the varbit?
(In my logic I would prefer int4!)

Using the above as in MySQL, I get an ERROR:
WHERE clause must return type bool, not type int4

Can anyone point me to a right doc or kickstart myself?

Thanx,

Alex

--
___________________________
Alexander Lohse
Human Touch Medienproduktion GmbH
Am See 1
17440 Klein Jasedow

Tel: (038374) 75211
Fax: (038374) 75223
eMail: al(at)humantouch(dot)de
http://www.humantouch.de

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2001-04-02 15:07:09 Re: Re: [SQL] Re: pg_dump potential bug -UNIQUE INDEX on PG_SHADOW Dont!! HELP
Previous Message Tom Lane 2001-04-02 14:37:27 Re: Cascading deletes with rules in 7.0.3: why doesn't this work?