jsonb_plruby
Transform between jsonb and native Ruby data for PL/Ruby
plruby : Transform between jsonb and native Ruby data for PL/Ruby
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 3161 | jsonb_plruby | plruby | 1.0 |
LANG | MIT | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-d-r | No | Yes | No | Yes | yes | no |
| Relationships | |
|---|---|
| Requires | plruby |
| See Also | plruby hstore_plruby ltree_plruby jsonb_plperl jsonb_plpython3u |
| Siblings | plruby hstore_plruby ltree_plruby |
Extension control default_version is 1.0; shipped in the PL/Ruby 2.5.0 package.
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.0 |
18 17 16 15 14 | plruby |
plruby |
| RPM | PIGSTY | 2.5.0 |
18 17 16 15 14 | plruby_$v |
ruby-libs |
| DEB | PIGSTY | 2.5.0 |
18 17 16 15 14 | postgresql-$v-plruby |
- |
| Linux / 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 |
Source
github.com/commandprompt/plruby
plruby-2.5.0.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Create this extension with:
Usage
Sources:
jsonb_plruby installs a PostgreSQL transform between jsonb and native Ruby values for the plruby language. A transformed jsonb argument becomes a Ruby Hash, Array, String, Integer, Float, true, false, or nil; compatible Ruby values can be returned directly as jsonb.
Install and Use the Transform
The transform is used only by functions that declare TRANSFORM FOR TYPE jsonb. Other PL/Ruby functions keep the language’s ordinary JSONB conversion behavior.
Objects and Caveats
jsonb_to_plruby(internal)implements SQL-to-Ruby conversion.plruby_to_jsonb(internal)implements Ruby-to-SQL conversion.- The extension version is
1.0, it requiresplruby, and it is relocatable. - Ruby
Hashkeys returned to PostgreSQL must be valid JSON object keys, and numeric/special values must be representable by PostgreSQLjsonb. Test nested values and numeric limits explicitly. - PL/Ruby remains untrusted. Installing this transform does not sandbox Ruby code or reduce the privileges required to create PL/Ruby functions.