Skip to content

pg_erlang_term

PostgreSQL type for encoding, storing, and decoding Erlang External Term Format values.

pg_erlang_term · PostgreSQL type for encoding, storing, and decoding Erlang External Term Format values.

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
101906pg_erlang_termpg_erlang_term0.0.1TYPEPostgreSQLC

Usage

Sources:

pg_erlang_term PostgreSQL type for encoding, storing, and decoding Erlang External Term Format values.

Enablement

Install the files for the intended server, then create pg_erlang_term in the target database:

CREATE EXTENSION pg_erlang_term;

Core Workflow

The following example is taken from the reviewed upstream documentation. Adapt object names, paths, credentials, and workload values before use.

CREATE TABLE messages (payload erlang_term);
INSERT INTO messages VALUES ('{ok,42}'::erlang_term);
SELECT payload FROM messages;

Main Objects

The reviewed install surface includes these prominent objects:

ObjectKindOperational role
erlang_termTYPEUser-facing data type created by the extension.
erlang_term_decodeFUNCTIONCallable function from the reviewed install surface.
erlang_term_encodeFUNCTIONCallable function from the reviewed install surface.
erlang_term_inputFUNCTIONCallable function from the reviewed install surface.
erlang_term_outputFUNCTIONCallable function from the reviewed install surface.
erlang_term_receiveFUNCTIONCallable function from the reviewed install surface.
erlang_term_sendFUNCTIONCallable function from the reviewed install surface.

Operations and Boundaries

  • Treat extension upgrades as database changes: review the upstream upgrade path, privileges, locks, and backup/restore behavior first.

Table reader