Skip to content

ora_btree_gin

Support for indexing oracle datatypes in GIN

ivorysql · Support for indexing oracle datatypes in GIN

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
9150ora_btree_ginivorysql1.0SIMApache-2.0C
AttributeHas BinaryHas LibraryNeed LoadHas DDLRelocatableTrusted
--s-dt-NoYesNoYesnoyes

Packages

TypeRepoVersionPG Major CompatibilityPackage PatternDependencies
EXTPIGSTY1.019 18 17 16 15ivorysqlivorysql_ora
RPMPIGSTY6.019 18 17 16 15ivorysql-$v-
DEBPIGSTY6.019 18 17 16 15ivorysql-$v-
Linux / PGPG19PG18PG17PG16PG15
el8.x86_64PIGSTY 6.0PIGSTY 5.6N/AN/AN/A
el8.aarch64PIGSTY 6.0PIGSTY 5.6N/AN/AN/A
el9.x86_64PIGSTY 6.0PIGSTY 5.6N/AN/AN/A
el9.aarch64PIGSTY 6.0PIGSTY 5.6N/AN/AN/A
el10.x86_64PIGSTY 6.0PIGSTY 5.6N/AN/AN/A
el10.aarch64PIGSTY 6.0PIGSTY 5.6N/AN/AN/A
d12.x86_64PIGSTY 6.0PIGSTY 5.6N/AN/AN/A
d12.aarch64PIGSTY 6.0PIGSTY 5.6N/AN/AN/A
d13.x86_64PIGSTY 6.0PIGSTY 5.6N/AN/AN/A
d13.aarch64PIGSTY 6.0PIGSTY 5.6N/AN/AN/A
u22.x86_64PIGSTY 6.0PIGSTY 5.6N/AN/AN/A
u22.aarch64PIGSTY 6.0PIGSTY 5.6N/AN/AN/A
u24.x86_64PIGSTY 6.0PIGSTY 5.6N/AN/AN/A
u24.aarch64PIGSTY 6.0PIGSTY 5.6N/AN/AN/A
u26.x86_64PIGSTY 6.0PIGSTY 5.6N/AN/AN/A
u26.aarch64PIGSTY 6.0PIGSTY 5.6N/AN/AN/A

Source

github.com/IvorySQL/IvorySQL/tree/2269591ea327cbf99e7db6f518ec6ecf67cdadee/contrib/ora_btree_gin

pig build pkg ivorysql;		# build rpm/deb

Install

Make sure PGDG and PIGSTY repo available:

pig repo add pgsql -u   # add both repo and update cache

Install this extension with pig:

pig install ivorysql;		# install by package name
pig install ora_btree_gin;		# install by extension name

pig install ora_btree_gin -v 19;   # install for PG 19
pig install ora_btree_gin -v 18;   # install for PG 18

Create this extension with:

CREATE EXTENSION ora_btree_gin CASCADE; -- requires ivorysql_ora

Usage

Sources:

The extension adds GIN operator classes for IvorySQL types, including sys.number. It supports indexed comparisons on these scalar values and can share a multicolumn GIN index with other GIN operator classes.

IvorySQL 6.0 is based on PostgreSQL 19.0 and ships ora_btree_gin at SQL version 1.0. The PG18 package uses IvorySQL 5.6.

Install ivorysql_ora in the database first. This example indexes a numeric column with sys.gin_number_ops.

CREATE EXTENSION IF NOT EXISTS ora_btree_gin;
CREATE TEMP TABLE gin_amounts (amount sys.number);
CREATE INDEX ON gin_amounts USING gin (amount sys.gin_number_ops);
SELECT amount FROM gin_amounts WHERE amount >= 100;

The control file marks the extension as trusted and fixes the operator classes in sys. Creating the index requires ownership of the table.

Table reader