omni_aws

omni_aws

omnigres : Amazon Web Services APIs (S3)

Overview

ID Extension Package Version Category License Language
2942
omni_aws
omnigres
0.1.2
FEAT
Apache-2.0
C
Attribute Has Binary Has Library Need Load Has DDL Relocatable Trusted
----dt-
No
No
No
Yes
no
yes
Relationships
Schemas omni_aws
Requires
omni_httpc
pgcrypto
omni_xml
omni_web
Siblings
omni
omni_auth
omni_cloudevents
omni_containers
omni_credentials
omni_email
omni_http
omni_httpc
omni_httpd
omni_id
omni_json
omni_kube
omni_ledger
omni_manifest
omni_mimetypes
omni_os
omni_polyfill
omni_python
omni_regex
omni_rest
omni_schema
omni_seq
omni_service
omni_session
omni_sql
omni_sqlite
omni_test
omni_txn
omni_types
omni_var
omni_vfs
omni_vfs_types_v1
omni_web
omni_worker
omni_xml
omni_yaml

Packages

Type Repo Version PG Major Compatibility Package Pattern Dependencies
EXT
PIGSTY
0.1.2
18
17
16
15
14
omnigres omni_httpc, pgcrypto, omni_xml, omni_web
RPM
PIGSTY
0.1.2
18
17
16
15
14
omnigres_$v -
DEB
PIGSTY
0.1.2
18
17
16
15
14
postgresql-$v-omnigres -
Linux / PG PG18 PG17 PG16 PG15 PG14
el8.x86_64
MISS
PIGSTY 20250120
PIGSTY 20250120
PIGSTY 20250120
PIGSTY 20250120
el8.aarch64
MISS
PIGSTY 20250120
PIGSTY 20250120
PIGSTY 20250120
PIGSTY 20250120
el9.x86_64
MISS
PIGSTY 20250507
PIGSTY 20250507
PIGSTY 20250507
PIGSTY 20250507
el9.aarch64
MISS
PIGSTY 20250507
PIGSTY 20250507
PIGSTY 20250507
PIGSTY 20250507
el10.x86_64
MISS
MISS
MISS
MISS
MISS
el10.aarch64
MISS
MISS
MISS
MISS
MISS
d12.x86_64
MISS
PIGSTY 20250120
PIGSTY 20250120
PIGSTY 20250120
PIGSTY 20250120
d12.aarch64
MISS
PIGSTY 20250120
PIGSTY 20250120
PIGSTY 20250120
PIGSTY 20250120
d13.x86_64
PIGSTY 20251108
PIGSTY 20251108
PIGSTY 20251108
PIGSTY 20251108
PIGSTY 20251108
d13.aarch64
PIGSTY 20251108
PIGSTY 20251108
PIGSTY 20251108
PIGSTY 20251108
PIGSTY 20251108
u22.x86_64
MISS
PIGSTY 20250120
PIGSTY 20250120
PIGSTY 20250120
PIGSTY 20250120
u22.aarch64
MISS
PIGSTY 20250120
PIGSTY 20250120
PIGSTY 20250120
PIGSTY 20250120
u24.x86_64
PIGSTY 20251108
PIGSTY 20251108
PIGSTY 20251108
PIGSTY 20251108
PIGSTY 20251108
u24.aarch64
PIGSTY 20251108
PIGSTY 20251108
PIGSTY 20251108
PIGSTY 20251108
PIGSTY 20251108

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 via package name, for the active PG version
pig install omni_aws;		# install by extension name, for the current active PG version

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
pig install omni_aws -v 14;   # install for PG 14

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
Last updated on