Skip to content

omni_id

Identity types

omnigres · Identity types

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
2952omni_idomnigres0.4.3FEATApache-2.0C
AttributeHas BinaryHas LibraryNeed LoadHas DDLRelocatableTrusted
--s-d-rNoYesNoYesyesno

Packages

TypeRepoVersionPG Major CompatibilityPackage PatternDependencies
EXTPIGSTY0.4.319 18 17 16 15omnigres-
RPMPIGSTY2026021219 18 17 16 15omnigres_$vpostgresql$v-contrib, postgresql$v-plpython3, python3-pip
DEBPIGSTY2026021219 18 17 16 15postgresql-$v-omnigrespostgresql-plpython3-$v, python3-pip
Linux / PGPG19PG18PG17PG16PG15
el8.x86_64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212
el8.aarch64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212
el9.x86_64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212
el9.aarch64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212
el10.x86_64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212
el10.aarch64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212
d12.x86_64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212
d12.aarch64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212
d13.x86_64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212
d13.aarch64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212
u22.x86_64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212
u22.aarch64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212
u24.x86_64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212
u24.aarch64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212
u26.x86_64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212
u26.aarch64N/APIGSTY 20260212PIGSTY 20260212PIGSTY 20260212PIGSTY 20260212

Source

docs.omnigres.org/omni_id/identity_type/

pig build pkg omnigres;		# 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 omnigres;		# install by package name
pig install omni_id;		# install by extension name

pig install omni_id -v 18;   # install for PG 18
pig install omni_id -v 17;   # install for PG 17
pig install omni_id -v 16;   # install for PG 16
pig install omni_id -v 15;   # install for PG 15

Create this extension with:

CREATE EXTENSION omni_id;

Usage

omni_id: Identity types

The omni_id extension introduces custom identity types that prevent comparison errors between different ID types, catching bugs at query time.

Create an Identity Type

CREATE EXTENSION omni_id;
SELECT identity_type('user_id');

This creates a user_id type backed by bigint (default) with an auto-created sequence and constructor function.

Parameters

ParameterDefaultDescription
typebigintBase type (int, smallint, uuid)
sequence<type>_seqSequence identifier
create_sequencetrueAuto-create sequence
increment1Sequence step value
cache–Pre-allocate sequence numbers
cycle–Enable wraparound at limits
constructor–Constructor function name
operator_schemapublicSchema for operators

Auto-Generated Functions

  • user_id(1) – Constructor
  • user_id_nextval() – Get next value
  • user_id_currval() – Get current value
  • user_id_setval(user_id, bool) – Set value

Table reader