omni_json

JSON toolkit

Overview

PackageVersionCategoryLicenseLanguage
omnigres0.1.1FEATApache-2.0C
IDExtensionBinLibLoadCreateTrustRelocSchema
2940omniNoYesYesYesNoNoomni
2941omni_authNoNoNoYesNoNoomni_auth
2942omni_awsNoNoNoYesYesNoomni_aws
2943omni_cloudeventsNoNoNoYesYesNoomni_cloudevents
2944omni_containersNoYesNoYesNoNoomni_containers
2945omni_credentialsNoNoNoYesNoNoomni_credentials
2948omni_emailNoNoNoYesNoNoomni_email
2949omni_httpNoNoNoYesNoNoomni_http
2950omni_httpcNoYesNoYesNoNoomni_httpc
2951omni_httpdNoYesNoYesNoNoomni_httpd
2952omni_idNoYesNoYesNoYes-
2953omni_jsonNoNoNoYesYesNoomni_json
2954omni_kubeNoYesNoYesNoNoomni_kube
2955omni_ledgerNoYesNoYesNoNoomni_ledger
2956omni_manifestNoNoNoYesNoNoomni_manifest
2957omni_mimetypesNoNoNoYesNoNoomni_mimetypes
2958omni_osNoYesNoYesNoNoomni_os
2959omni_polyfillNoYesNoYesNoNoomni_polyfill
2960omni_pythonNoYesNoYesNoNoomni_python
2961omni_regexNoYesNoYesNoYes-
2962omni_restNoNoNoYesNoNoomni_rest
2963omni_schemaNoNoNoYesNoNoomni_schema
2964omni_seqNoYesNoYesNoNoomni_seq
2965omni_serviceNoNoNoYesNoNoomni_service
2966omni_sessionNoNoNoYesNoNoomni_session
2968omni_sqlNoYesNoYesNoNoomni_sql
2969omni_sqliteNoYesNoYesNoNoomni_sqlite
2970omni_testNoNoNoYesNoNoomni_test
2971omni_txnNoYesNoYesNoNoomni_txn
2972omni_typesNoYesNoYesNoNoomni_types
2973omni_varNoYesNoYesNoNoomni_var
2974omni_vfsNoYesNoYesNoNoomni_vfs
2975omni_vfs_types_v1NoNoNoYesNoNoomni_vfs_types_v1
2976omni_webNoYesNoYesNoNoomni_web
2977omni_workerNoYesNoYesNoNoomni_worker
2978omni_xmlNoYesNoYesNoNoomni_xml
2979omni_yamlNoYesNoYesNoNoomni_yaml

Version

TypeRepoVersionPG VerPackageDeps
EXTPIGSTY0.1.11817161514omnigres-
RPMPIGSTY0.1.11817161514omnigres_$v-
DEBPIGSTY0.1.11817161514postgresql-$v-omnigres-
OS / PGPG18PG17PG16PG15PG14
el8.x86_64PIGSTY MISSPIGSTY 20250120PIGSTY 20250120PIGSTY 20250120PIGSTY 20250120
el8.aarch64PIGSTY MISSPIGSTY 20250120PIGSTY 20250120PIGSTY 20250120PIGSTY 20250120
el9.x86_64PIGSTY MISSPIGSTY 20250507PIGSTY 20250507PIGSTY 20250507PIGSTY 20250507
el9.aarch64PIGSTY MISSPIGSTY 20250507PIGSTY 20250507PIGSTY 20250507PIGSTY 20250507
el10.x86_64PIGSTY MISSPIGSTY MISSPIGSTY MISSPIGSTY MISSPIGSTY MISS
el10.aarch64PIGSTY MISSPIGSTY MISSPIGSTY MISSPIGSTY MISSPIGSTY MISS
d12.x86_64PIGSTY MISSPIGSTY 20250120PIGSTY 20250120PIGSTY 20250120PIGSTY 20250120
d12.aarch64PIGSTY MISSPIGSTY 20250120PIGSTY 20250120PIGSTY 20250120PIGSTY 20250120
d13.x86_64PIGSTY 20251108PIGSTY 20251108PIGSTY 20251108PIGSTY 20251108PIGSTY 20251108
d13.aarch64PIGSTY 20251108PIGSTY 20251108PIGSTY 20251108PIGSTY 20251108PIGSTY 20251108
u22.x86_64PIGSTY MISSPIGSTY 20250120PIGSTY 20250120PIGSTY 20250120PIGSTY 20250120
u22.aarch64PIGSTY MISSPIGSTY 20250120PIGSTY 20250120PIGSTY 20250120PIGSTY 20250120
u24.x86_64PIGSTY 20251108PIGSTY 20251108PIGSTY 20251108PIGSTY 20251108PIGSTY 20251108
u24.aarch64PIGSTY 20251108PIGSTY 20251108PIGSTY 20251108PIGSTY 20251108PIGSTY 20251108

Build

You can build the RPM / DEB packages for omnigres using pig build:

pig build pkg omnigres         # build RPM / DEB packages

Install

You can install omnigres directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:

pig repo add pgsql -u          # Add repo and update cache

Install the extension using pig or apt/yum/dnf:

pig install omnigres;          # Install for current active PG version
pig ext install -y omnigres -v 18  # PG 18
pig ext install -y omnigres -v 17  # PG 17
pig ext install -y omnigres -v 16  # PG 16
pig ext install -y omnigres -v 15  # PG 15
pig ext install -y omnigres -v 14  # PG 14
dnf install -y omnigres_18       # PG 18
dnf install -y omnigres_17       # PG 17
dnf install -y omnigres_16       # PG 16
dnf install -y omnigres_15       # PG 15
dnf install -y omnigres_14       # PG 14
apt install -y postgresql-18-omnigres   # PG 18
apt install -y postgresql-17-omnigres   # PG 17
apt install -y postgresql-16-omnigres   # PG 16
apt install -y postgresql-15-omnigres   # PG 15
apt install -y postgresql-14-omnigres   # PG 14

Create Extension:

CREATE EXTENSION omni_json;

Usage

omni_json: JSON toolkit

The omni_json extension provides table-to-JSON mapping with custom transformations when converting rows to JSON.

Define a Table Mapping

SELECT omni_json.define_table_mapping(example, '{}');

Column Renaming

SELECT omni_json.define_table_mapping(example, '{
    "columns": { "dob": { "path": "date_of_birth" } }
}');

Nested Keys

SELECT omni_json.define_table_mapping(example, '{
    "columns": {
        "first_name": { "path": ["name", "first"] },
        "last_name":  { "path": ["name", "last"] }
    }
}');

Column Exclusion

SELECT omni_json.define_table_mapping(example, '{
    "columns": { "dob": { "exclude": true } }
}');

Column Transformation

Input (JSON to record) and output (record to JSON) transforms:

{
    "columns": {
        "password": {
            "transform": {
                "input":  { "type": "text", "function": "encrypt_password" },
                "output": { "type": "text", "function": "mask_password" }
            }
        }
    }
}

Querying as JSON

SELECT to_jsonb(products.*) FROM products;

Inserting from JSON

INSERT INTO people (dob, first_name, last_name)
    (SELECT dob, first_name, last_name
     FROM jsonb_populate_record(null::people,
         '{"first_name": "Jane", "last_name": "Doe", "dob": "1981-12-12"}'));

Last Modified 2026-03-12: add pg extension catalog (95749bf)