Re: 'bitwise and' index - Mailing list pgsql-sql

From Igor Neyman
Subject Re: 'bitwise and' index
Date
Msg-id A76B25F2823E954C9E45E32FA49D70ECCD407E57@mail.corp.perceptron.com
Whole thread Raw
In response to 'bitwise and' index  (Lance Jacob <JacobLJ@familysearch.org>)
List pgsql-sql

 

 

From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of Lance Jacob
Sent: Friday, March 20, 2015 1:28 PM
To: pgsql-sql@postgresql.org
Subject: [SQL] 'bitwise and' index

 

I have an Oracle database that I migrated to Postgres.  I’ve been successful with everything except the creation of one index.  On the oracle side the index was created with the syntax “create index abc on xyz (bitand(column_name,16384))”.  What would be the proper syntax for creating a similar bitwise function-based index in Postgres?  Or, is it even possible?

 

LanceJacob

 


Try:

create index abc on xyz (column_name & 16384);

 

Regards,

Igor Neyman

 

 

pgsql-sql by date:

Previous
From: Lance Jacob
Date:
Subject: 'bitwise and' index
Next
From: Suresh Raja
Date:
Subject: check data for datatype