Re: PL/Java 1.5.2 - fixes one regression in date conversion in 1.5.1

From: Chapman Flack <chap(at)anastigmatix(dot)net>
To: Devrim Gündüz <devrim(at)gunduz(dot)org>, pgsql-pkg-yum(at)postgresql(dot)org
Subject: Re: PL/Java 1.5.2 - fixes one regression in date conversion in 1.5.1
Date: 2019-02-26 21:18:56
Message-ID: b2b0549c-fb47-c5b0-4e22-54d5df493fed@anastigmatix.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-pkg-debian pgsql-pkg-yum pljava-dev

On 2/26/19 2:16 PM, Devrim Gündüz wrote:
> How does it look now?
>
> # ll *sql
> lrwxrwxrwx 1 root root 39 Feb 26 22:13 pljava--1.5.0--1.5.1.sql -> /usr/pgsql-11/share/pljava/pljava--.sql
> lrwxrwxrwx 1 root root 39 Feb 26 22:13 pljava--1.5.0-BETA1--1.5.1.sql -> /usr/pgsql-11/share/pljava/pljava--.sql
> lrwxrwxrwx 1 root root 39 Feb 26 22:13 pljava--1.5.0-BETA2--1.5.1.sql -> /usr/pgsql-11/share/pljava/pljava--.sql
> lrwxrwxrwx 1 root root 39 Feb 26 22:13 pljava--1.5.0-BETA3--1.5.1.sql -> /usr/pgsql-11/share/pljava/pljava--.sql
> lrwxrwxrwx 1 root root 39 Feb 26 22:13 pljava--1.5.1--1.5.2.sql -> /usr/pgsql-11/share/pljava/pljava--.sql
> lrwxrwxrwx 1 root root 39 Feb 26 22:13 pljava--1.5.1-BETA1--1.5.1.sql -> /usr/pgsql-11/share/pljava/pljava--.sql
> lrwxrwxrwx 1 root root 39 Feb 26 22:13 pljava--1.5.1-BETA2--1.5.1.sql -> /usr/pgsql-11/share/pljava/pljava--.sql
> lrwxrwxrwx 1 root root 39 Feb 26 22:13 pljava--1.5.1-BETA3--1.5.1.sql -> /usr/pgsql-11/share/pljava/pljava--.sql
> -rw-r--r-- 1 root root 3228 Feb 26 22:13 pljava--1.5.2.sql
> -rw-r--r-- 1 root root 2433 Feb 26 22:13 pljava--.sql
> -rw-r--r-- 1 root root 3580 Feb 26 22:13 pljava--unpackaged--1.5.2.sql

Hi Devrim,

Thanks for taking a look ... that's better, with one complication, though.

It has links for updating 150-BETA* to 150, 151-BETA* and 150 to 151,
151-BETA* and 151 to 152, which would be the typical arrangement for a
typical extension, and would cause PostgreSQL to automatically apply
multiple scripts in sequence.

The multiple script sequence won't work in PL/Java though, because
the updating work is really done inside PL/Java at its own startup,
which can't be repeated over a single backend connection.
(You have seen that they are all links to one script, which does
nothing but store the library pathname and exnihilo=false (indicating
update) in a table and LOAD the library, which unconditionally applies
any schema updates needed to match its own version. PostgreSQL itself
treats later LOADs of the same library as no-ops, so I couldn't
make the multiple-script sequence work if I wanted to).

This is sort of an imperfect fit with the PG extension conventions,
but PL/Java 1.5.x still supports PG versions older than the extension
feature, so updating has to be easy for them too.

So the intent for packaging is to include a link pljava--foo--1.5.2.sql
for every plausible prior version foo, so PostgreSQL will choose
a one-script update path no matter which prior version is installed.

The actual files placed into an "official" build can be found
starting here:

https://github.com/tada/pljava/blob/REL1_5_STABLE/pljava-packaging/build.xml#L280

Thanks!
-Chap

In response to

Responses

Browse pgsql-pkg-debian by date

  From Date Subject
Next Message Chapman Flack 2019-02-27 19:38:51 Re: PL/Java 1.5.2 - fixes one regression in date conversion in 1.5.1
Previous Message Devrim Gündüz 2019-02-26 19:16:13 Re: PL/Java 1.5.2 - fixes one regression in date conversion in 1.5.1

Browse pgsql-pkg-yum by date

  From Date Subject
Next Message Martín Marqués 2019-02-26 22:28:13 barman-cli not installing on Fedora
Previous Message Devrim Gündüz 2019-02-26 19:16:13 Re: PL/Java 1.5.2 - fixes one regression in date conversion in 1.5.1

Browse pljava-dev by date

  From Date Subject
Next Message Chapman Flack 2019-02-27 19:38:51 Re: PL/Java 1.5.2 - fixes one regression in date conversion in 1.5.1
Previous Message Devrim Gündüz 2019-02-26 19:16:13 Re: PL/Java 1.5.2 - fixes one regression in date conversion in 1.5.1