Greenplum Oracle compatibility packages

Installing Oracle Compatibility Functions

Before using any Oracle Compatibility Functions, run the installation script $GPHOME/share/postgresql/contrib/orafunc.sql once for each database. For example, to install the functions in database testdb, use the command

$ psql –d testdb –f \

$GPHOME/share/postgresql/contrib/orafunc.sql

To uninstall Oracle Compatibility Functions, run the uinstall_orafunc.sql script:

$GPHOME/share/postgresql/contrib/uninstall_orafunc.sql.

The following functions are available by default and do not require running the Oracle Compatibility installer:

•sinh

•tanh

•cosh

•decode

Note: The Oracle Compatibility Functions reside in the oracompat schema. To access them, prefix the schema name (oracompat) or alter the database search path to include the schema name. For example:

ALTER DATABASE db_name SET search_path = $user, public, oracompat;

If you alter the database search path, you must restart the database.