ltree_plruby
Transform between ltree and Ruby Arrays for PL/Ruby
Repository
commandprompt/plruby
https://github.com/commandprompt/plruby
Source
plruby-2.5.0.tar.gz
plruby-2.5.0.tar.gz
Overview
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 3160 | plruby | No | Yes | No | Yes | No | No | pg_catalog |
| 3161 | jsonb_plruby | No | Yes | No | Yes | No | Yes | - |
| 3162 | hstore_plruby | No | Yes | No | Yes | No | Yes | - |
| 3163 | ltree_plruby | No | Yes | No | Yes | No | Yes | - |
| Related | ltree plruby ltree plruby hstore_plruby jsonb_plruby |
|---|
Extension control default_version is 1.0; shipped in the PL/Ruby 2.5.0 package.
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.0 | 1817161514 | plruby | ltree, plruby |
| RPM | PIGSTY | 2.5.0 | 1817161514 | plruby_$v | ruby-libs |
| DEB | PIGSTY | 2.5.0 | 1817161514 | postgresql-$v-plruby | - |
| OS / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 |
| el8.aarch64 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 |
| el9.x86_64 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 |
| el9.aarch64 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 |
| el10.x86_64 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 |
| el10.aarch64 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 |
| d12.x86_64 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 |
| d12.aarch64 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 |
| d13.x86_64 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 |
| d13.aarch64 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 |
| u22.x86_64 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 |
| u22.aarch64 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 |
| u24.x86_64 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 |
| u24.aarch64 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 |
| u26.x86_64 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 |
| u26.aarch64 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 | PIGSTY 2.5.0 |
Build
You can build the RPM / DEB packages for plruby using pig build:
Install
You can install plruby directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Install
pig
dnf
apt
Create Extension:
Usage
Sources:
ltree_plruby installs a PostgreSQL transform between ltree paths and Ruby arrays for the plruby language. An ltree argument becomes an array of label strings, and an array of valid labels can be returned directly as an ltree value.
Install and Use the Transform
The transform is used only by functions that declare TRANSFORM FOR TYPE ltree.
Objects and Caveats
ltree_to_plruby(internal)implements SQL-to-Ruby conversion.plruby_to_ltree(internal)implements Ruby-to-SQL conversion.- The extension version is
1.0, it requires bothltreeandplruby, and it is relocatable. - Every returned array element must be a valid
ltreelabel. PostgreSQL rejects invalid characters, empty labels, or paths that exceedltreelimits. - PL/Ruby remains untrusted. Installing this transform does not sandbox Ruby code or reduce the privileges required to create PL/Ruby functions.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)