alfredherr / pg_erlang_term

PostgreSQL extension for Erlang terms

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pg_erlang_term

pg_erlang_term is a PostgreSQL extension that adds a new data type erlang_term for storing and working with arbitrary Erlang terms.

The terms are stored in the Erlang External Term format internally and are sent unmodified over the network when using binary input/output (Postgrex does this).

Installing

pg_erlang_term depends on the ei library which is included in Erlang/OTP.

Build and install pg_erlang_term like so:

$ make
$ sudo make install

and optionally:

$ make installcheck

and then in PostgreSQL:

CREATE EXTENSION pg_erlang_term;

Limitations

The textual representation of Erlang terms is currently handled by ei_s_print_term for decoding and ei_x_format for encoding.

These functions have some limitations and may not be able represent all kinds of Erlang terms.

Note that Ecto+Postgrex uses binary input/output which does not have these problems.

About

PostgreSQL extension for Erlang terms

License:Other


Languages

Language:C 88.8%Language:Makefile 11.2%