From 95a03c3e59769508106cb5c900faa8f5b5b191d5 Mon Sep 17 00:00:00 2001 From: "Joshua D. Drake" Date: Wed, 26 Aug 2026 13:07:44 -0600 Subject: [PATCH] Link the PGXN distribution from README and INSTALL plruby 2.5.0 is published on PGXN, so point people at it: a badge next to the others, "pgxn install plruby" as the first installation path, and the distribution page in the documentation list. INSTALL gets the client's "pgxn load -d mydb plruby" next to CREATE EXTENSION, and a note that "pgxn install" builds only the top-level extension, so a transform still needs its subdirectory built from a download or a checkout. The maintainer section records where to upload and that pgxn.org and api.pgxn.org trail master.pgxn.org until the next mirror sync, since a 404 right after a release reads as a failed upload otherwise. The README badge version joins the list of things to bump when cutting a release. Co-Authored-By: Claude Opus 5 (1M context) --- INSTALL | 26 +++++++++++++++++++++++--- README.md | 17 ++++++++++++++++- 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/INSTALL b/INSTALL index d6ee7c4..683a6b2 100644 --- a/INSTALL +++ b/INSTALL @@ -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 @@ -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. @@ -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) ----------------------------------- @@ -83,8 +99,12 @@ archive from a committed tree with: That writes plruby-.zip, taking the version from META.json, and the archive expands into a single plruby-/ 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. diff --git a/README.md b/README.md index 9a99741..485cfbc 100644 --- a/README.md +++ b/README.md @@ -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/) @@ -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`. @@ -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)