Skip to content

omni_aws

Amazon Web Services APIs (S3)

omnigres · Amazon Web Services APIs (S3)

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
2942omni_awsomnigres0.1.2FEATApache-2.0C
AttributeHas BinaryHas LibraryNeed LoadHas DDLRelocatableTrusted
----dt-NoNoNoYesnoyes

Packages

TypeRepoVersionPG Major CompatibilityPackage PatternDependencies
EXTPIGSTY0.1.219 18 17 16 15omnigresomni_httpc, pgcrypto, omni_xml, omni_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

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

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

Create this extension with:

CREATE EXTENSION omni_aws CASCADE; -- requires omni_httpc, pgcrypto, omni_xml, omni_web

Usage

omni_aws: Amazon Web Services APIs (S3)

The omni_aws extension provides S3-compatible API functions for PostgreSQL.

S3 API Functions

s3_create_bucket(bucket, region) – Creates an S3 bucket.

s3_list_objects_v2(bucket, path, continuation_token, delimiter, encoding_type, fetch_owner, max_keys, start_after, region) – Lists objects in a bucket with pagination support.

s3_put_object(bucket, path, payload, content_type, region) – Uploads an object. Default content type is application/octet-stream.

Execution

Single request:

SELECT * FROM omni_aws.aws_execute(
    access_key_id => 'AKID',
    secret_access_key => 'SECRET',
    request => omni_aws.s3_put_object('my-bucket', '/path/to/file', 'content'::bytea)
);

Batch requests: Pass requests as an array for efficient batch operations. Returns a table with an error column.

Pre-signed URLs

SELECT omni_aws.s3_presigned_url(
    bucket => 'my-bucket',
    path => '/my-file',
    access_key_id => 'AKID',
    secret_access_key => 'SECRET',
    expires => 604800,  -- 7 days (default)
    region => 'us-east-1'
);

Custom Endpoints

  • DigitalOcean Spaces: digitalocean_s3_endpoint()
  • Generic: s3_endpoint(url) with ${region} and ${bucket} variables for MinIO and similar providers

Table reader