Skip to content

Installing as an Extension

The preferred mode, if your environment allows it — a real CREATE EXTENSION install, indistinguishable from any other PostgreSQL extension from that point on.

Requirements

Filesystem access to this PostgreSQL installation's extension directory — i.e. you can run make install yourself, or have someone who can. There's no C code to compile; make install for this project just copies two plain files (orafce_no_c.control and orafce_no_c--1.0.sql) into place via pg_config --sharedir.

Installing

cd extension
make install

Then, in the target database:

CREATE EXTENSION orafce_no_c;

This creates all 10 schemas and every object in them in one step. If real orafce is already installed in this database, or any of the 10 target schema names already exists, this fails immediately with a clear error and rolls back cleanly — see Why It Refuses to Install Over Real orafce.

Uninstalling

DROP EXTENSION orafce_no_c;

One command, removes every object it created. See Uninstalling for the full picture, including the standalone-script equivalent.

Upgrading

extension/orafce_no_c--1.0.sql is the version-1.0 install script. A future version would ship as an additional upgrade script (e.g. orafce_no_c--1.0--1.1.sql), applied via:

ALTER EXTENSION orafce_no_c UPDATE;

The refuse-to-install checks described in Why It Refuses to Install Over Real orafce only apply to a fresh install — an upgrade doesn't repeat them, since the schemas are expected to already exist at that point.

Continue to Installing as Plain SQL — the alternative for environments where make install isn't possible.