Fixes issue 30525: Supports the use of Operator Classes in index columns
authorAugusto Mauch <>
Wed, 19 Aug 2015 08:47:15 +0200
changeset 27373 63aa49855670
parent 27372 243b29f38be2
child 27374 3b8dead7ca40
Fixes issue 30525: Supports the use of Operator Classes in index columns

The fix is very straightforward in PostgreSQL: if the column of an index defines an operator class, that operator class is included in the XML, and viceversa. This is very easy to do be
cause the info about the operator class used in the index column is stored in the indclass column of the pg_index table.

It gets more complicated for Oracle. Oracle does not have the concept of operator class, so when an index that defines one is imported, there is no standard place where to store it. And
it really needs to be stored, because otherwise when that index is exported from Oracle it would lose the operator class. To solve this, the operator classes used by index columns are
stored as comments in the table that owns the indexes with the following format:

These comments need to be updated each time an index that defines an operator class is added or removed, both when it is done at the same time of the table creation or after it.

The operator classes used in the index columns should not be taken into account when comparing indexes in Oracle. With this we achieve that indexes will not be recreated in oracle if the only change is tha
t an operator class has been added/removed from an index column.
Binary file src-db/database/lib/dbsourcemanager.jar has changed