Skip to content

omni_cloudevents

CloudEvents support

omnigres · CloudEvents support

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
2943omni_cloudeventsomnigres0.1.0FEATApache-2.0C
AttributeHas BinaryHas LibraryNeed LoadHas DDLRelocatableTrusted
----dt-NoNoNoYesnoyes

Packages

TypeRepoVersionPG Major CompatibilityPackage PatternDependencies
EXTPIGSTY0.1.019 18 17 16 15omnigresomni_web
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_cloudevents/cloud_events/

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_cloudevents;		# install by extension name

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

Create this extension with:

CREATE EXTENSION omni_cloudevents CASCADE; -- requires omni_web

Usage

omni_cloudevents: CloudEvents support

The omni_cloudevents extension enables creation, validation, and publication of standardized CloudEvents from SQL. It is a templated extension.

Setup

SELECT omni_cloudevents.instantiate(schema => 'omni_cloudevents');
SET search_path TO omni_cloudevents, public;

Creating Events

SELECT cloudevent(
    id     => gen_random_uuid(),
    source => 'https://service.com/endpoint',
    type   => 'user.login'
);

Optional parameters: datacontenttype, dataschema, subject, ts (defaults to now), data (any PG type), specversion (default 1.0).

Publishing Events

SELECT publish(
    cloudevent(
        id     => gen_random_uuid(),
        source => 'https://api.yourservice.com/sys',
        type   => 'file.uploaded',
        data   => 'data-lake-bucket-123'::text
    )
);

Published events are persisted in the cloudevents_egress table.

NOTICE Publisher

SELECT omni_cloudevents.create_notice_publisher();
-- To observe uncommitted events:
SELECT omni_cloudevents.create_notice_publisher(publish_uncommitted => true);
-- Delete a publisher:
SELECT omni_cloudevents.delete_publisher(name);

Events generate JSON-formatted NOTICE messages with full event details.

Table reader