Sign inSign up

sibedge/postgres-plv8

By sibedge

Updated about 1 year ago

Docker image with installed PLV8 extension on PostgreSQL 17 and PostgreSQL 16

Image
Developer tools
13

500K+

sibedge/postgres-plv8 repository overview

Postgres Docker Image | PLV8

Compact Debian/Alpine based docker image for PLV8 on Postgres incl. latest 17.6 and 16.10. Runs on Windows, Linux and Mac (with Apple silicon M1/M2/M3 support). Alpine-based images are enhanced adaptations of the official Postgres image, while Debian-based images are expanded versions of the Bitnami PostgreSQL package.

Support and periodic update releases for all versions PostgreSQL 17 and PostgreSQL 16.

Looking to run PLV8 on your physical or cloud server with a custom solution? Email us at [email protected], and we'll craft a build tailored just for you. For more details, visit our site: plv8.com

This repository is free to use.

amd64, arm64 architectures support:
Only amd64 architecture support:

How to use

This image is installed like the standard Postgres image. The only discrepancy is the complement PLV8 extension.

Create extension script should be executed first:

CREATE EXTENSION plv8;

Then you can perform SQL query:

DO $$
  plv8.elog(NOTICE, plv8.version);
$$ LANGUAGE plv8;

You should see the version of the PLV8 extension installed.

Image mods

Because of BigInt serialization issue this image comes in two variants:

Test the differences in work:
CREATE TABLE test
(
  id SERIAL PRIMARY KEY NOT NULL,
  comment text
);

INSERT INTO test(comment)
    VALUES ('abc'), ('def');

CREATE OR REPLACE FUNCTION get_count(table_name text)
  RETURNS jsonb
  LANGUAGE plv8 IMMUTABLE AS
$$
    const sql = `SELECT COUNT(*) AS cnt FROM "${table_name}"`;
    const data = plv8.execute(sql);
    return data[0];
$$;

SELECT * FROM get_count('test');
  • sibedge/postgres-plv8 result: {"cnt": "2"}
  • sibedge/postgres-plv8-bigint result: {"cnt": 2}

Contact us

Ask your questions via email: [email protected]

Our website plv8.com for ready-to-deploy on-prem PLV8 solutions.

Tag summary

Content type

Image

Digest

sha256:08cdf3704

Size

111.7 MB

Last updated

about 1 year ago

docker pull sibedge/postgres-plv8