Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ links against a shared-library Ruby (MRI).
2. Build and install
---------------------

PL/Ruby is on PGXN (https://pgxn.org/dist/plruby/), so with the PGXN client
(https://pgxn.github.io/pgxnclient/) the whole build is:

pgxn install plruby

That downloads the distribution and runs the same PGXS build described here.
From a checkout, or to pass the overrides below:

make
sudo make install

Expand All @@ -42,6 +50,10 @@ Override them if needed:

CREATE EXTENSION plruby;

The PGXN client runs the same statement with:

pgxn load -d mydb plruby

PL/Ruby is an untrusted language, so the extension is superuser-only to install
and only superusers can create PL/Ruby functions. See the SECURITY section of
README for why.
Expand Down Expand Up @@ -72,6 +84,10 @@ and TRANSFORM FOR TYPE ltree (Ruby Array of label Strings):
All three accept the same PG_CONFIG/RUBY overrides and have their own
"make installcheck".

"pgxn install plruby" builds only the top-level extension. To add a transform
on top of it, unpack the distribution ("pgxn download plruby") or use a
checkout, and build the subdirectory as above.

6. Packaging for PGXN (maintainers)
-----------------------------------

Expand All @@ -83,8 +99,12 @@ archive from a committed tree with:

That writes plruby-<version>.zip, taking the version from META.json, and the
archive expands into a single plruby-<version>/ directory, which is the shape
PGXN Manager expects at https://manager.pgxn.org/upload.
PGXN Manager expects.

Upload it at https://manager.pgxn.org/upload. A new release shows up
on master.pgxn.org right away; pgxn.org and api.pgxn.org serve it after their
next mirror sync, so a 404 there for a short while is expected.

When cutting a release, keep the "version" field in META.json in step with
plruby.control and the CHANGELOG, and the "provides" versions in step with the
per-extension .control files.
plruby.control and the CHANGELOG, the "provides" versions in step with the
per-extension .control files, and the PGXN badge version in README.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
[![Ruby](https://img.shields.io/badge/Ruby-3.x-CC342D?logo=ruby&logoColor=white)](https://www.ruby-lang.org/)
[![Tests](https://img.shields.io/badge/tests-44_passing-brightgreen)](sql/)
[![License](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
[![PGXN](https://img.shields.io/badge/PGXN-plruby_2.5.0-6d4c9f)](https://pgxn.org/dist/plruby/)

</div>

Expand Down Expand Up @@ -104,17 +105,30 @@ $$;

## Installation

From [PGXN](https://pgxn.org/dist/plruby/), with the
[PGXN client](https://pgxn.github.io/pgxnclient/):

```sh
pgxn install plruby
```

Or from a checkout:

```sh
make
sudo make install
```

Then, in a database:
Either way builds from source, so PostgreSQL's server development files and a
shared-library Ruby have to be present first (see
[Requirements](#requirements)). Then, in a database:

```sql
CREATE EXTENSION plruby;
```

`CREATE EXTENSION` requires a superuser, because PL/Ruby is untrusted.

See [**INSTALL**](INSTALL) for details, and run the regression suite with
`make installcheck`.

Expand All @@ -137,6 +151,7 @@ to roles you would trust with the server's OS account.
- [Performance benchmarks](doc/benchmark.md)
- [Installation](INSTALL)
- [Changelog](CHANGELOG.md)
- [PGXN distribution](https://pgxn.org/dist/plruby/)
- [Feature comparison: PL/Ruby vs PL/php vs PL/Perl vs PL/Tcl](doc/comparison.md)
- [PL/Ruby vs PL/Perl](doc/plperl-comparison.md)
- [PL/Ruby vs PL/Tcl](doc/pltcl-comparison.md)
Expand Down
Loading