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

Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Chapman Flack
Hi,

If I'm checking in the right place
  https://yum.postgresql.org/11/redhat/rhel-7.5-x86_64/

... the version of PL/Java that I'm seeing there is still 1.5.1.

Please forgive this repeat announcement if the 1.5.2 package is already
in the works. It would be valuable to have 1.5.2 packaged, because it
fixes a known bug in java.sql.Date conversion that was in 1.5.1.

Thanks!
-Chap


On 11/05/18 13:35, Chapman Flack wrote:

> ---
> Note to packagers - please make sure the newly-added file
> $sharedir/pljava/pljava--1.5.1--1.5.2.sql will be installed, alongside
> those from prior releases. It is found in the
> pljava-packaging/target/pljava-*.jar file but not in any build directory (it
> gets added
> synthetically to the jar file based on a template).
> ---
>
>
> PL/Java 1.5 brings functions, triggers, and types in Java to PostgreSQL
> releases from 11 back to 8.2. Release 1.5.2 fixes a regression in 1.5.1
> that affected the conversion of PostgreSQL date values to Java java.sql.Date
> objects.
>
> Project site: http://tada.github.io/pljava/
> Release notes: http://tada.github.io/pljava/releasenotes.html
>
> ## Change
>
> Before 1.5.1, PostgreSQL date, time, and timestamp values could be accessed
> in PL/Java as java.sql.Date, java.sql.Time, and java.sql.Timestamp objects.
> PL/Java 1.5.1 added the option of accessing those values as objects of new
> classes in the Java 8+ java.time package. The new classes are recommended as
> a superior API for accessing dates, times, and timestamps.
>
> However, one regression resulted in the older conversion between PostgreSQL
> date and java.sql.Date, leading to an error of one day for some dates of the
> year in some time zones. Release 1.5.2 restores the former behavior.
>
> Please see the release notes for more complete information.
>
> Availability:
>
> 1.5.2 is available from GitHub as a source release, which builds quickly
> using Maven:
>
> Release page: https://github.com/tada/pljava/releases/tag/V1_5_2
>
> This wiki page will add links to prebuilt packages that become available:
> https://github.com/tada/pljava/wiki/Prebuilt-packages
>

Reply | Threaded
Open this post in threaded view
|

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

Devrim GÜNDÜZ

Hi Chapman,

On Tue, 2019-01-01 at 00:04 -0500, Chapman Flack wrote:
> If I'm checking in the right place
>   https://yum.postgresql.org/11/redhat/rhel-7.5-x86_64/
>
> ... the version of PL/Java that I'm seeing there is still 1.5.1.
>
> Please forgive this repeat announcement if the 1.5.2 package is already
> in the works. It would be valuable to have 1.5.2 packaged, because it
> fixes a known bug in java.sql.Date conversion that was in 1.5.1.

Updated to 1.5.2 yesterday. Sorry for the delay.

Regards,
--
Devrim Gündüz
EnterpriseDB: https://www.enterprisedb.com
PostgreSQL Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

Chapman Flack
On 1/2/19 2:04 PM, Devrim Gündüz wrote:
>
> Updated to 1.5.2 yesterday. Sorry for the delay.

That was fast, thanks!

... but it does not have these files:

usr/pgsql-*/share/pljava/pljava--1.5.0--1.5.2.sql
usr/pgsql-*/share/pljava/pljava--1.5.1--1.5.2.sql

Without those files, ALTER EXTENSION pljava UPDATE; will fail
for sites that have 1.5.0 or 1.5.1 installed already.

The build process puts such files directly into the installer jar,
as copies of pljava--.sql with the right names.

Your packaging process seems to bypass the installer jar, so will
have to be responsible for making those files. It could make the
needed copies or links at build time, or even just include one
of them and make the remaining copies/links on the target system
in a post-install script.

More on that (and also on debuginfo and examples) was in [1].

Thanks,
-Chap

[1]
https://www.postgresql.org/message-id/5BC924A4.7080709%40anastigmatix.net

Reply | Threaded
Open this post in threaded view
|

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

Devrim GÜNDÜZ

Hi Chapman,

On Wed, 2019-01-02 at 14:34 -0500, Chapman Flack wrote:
> ... but it does not have these files:
>
> usr/pgsql-*/share/pljava/pljava--1.5.0--1.5.2.sql
> usr/pgsql-*/share/pljava/pljava--1.5.1--1.5.2.sql

I actually committed it a few mins ago :)

https://git.postgresql.org/gitweb/?p=pgrpms.git;a=commit;h=00dc4f440d958eb464615602ccb9e51cc83630ef

> Without those files, ALTER EXTENSION pljava UPDATE; will fail
> for sites that have 1.5.0 or 1.5.1 installed already.
>
> The build process puts such files directly into the installer jar,
> as copies of pljava--.sql with the right names.
>
> Your packaging process seems to bypass the installer jar, so will
> have to be responsible for making those files. It could make the
> needed copies or links at build time, or even just include one
> of them and make the remaining copies/links on the target system
> in a post-install script.

> More on that (and also on debuginfo and examples) was in [1].

They are already in 1.5.2-1.

Pushed 1.5.2-2 to repos, that include the .sql files.

Thanks!

Regards,
--
Devrim Gündüz
EnterpriseDB: https://www.enterprisedb.com
PostgreSQL Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

Chapman Flack
On 1/2/19 2:45 PM, Devrim Gündüz wrote:

>> More on that (and also on debuginfo and examples) was in [1].
>
> They are already in 1.5.2-1.
>
> Pushed 1.5.2-2 to repos, that include the .sql files.

Ah, there they are. Thanks!

-Chap

Reply | Threaded
Open this post in threaded view
|

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

Chapman Flack
On 1/2/19 5:09 PM, Chapman Flack wrote:
> On 1/2/19 2:45 PM, Devrim Gündüz wrote:
>
>>> More on that (and also on debuginfo and examples) was in [1].
>>
>> They are already in 1.5.2-1.
>>
>> Pushed 1.5.2-2 to repos, that include the .sql files.
>
> Ah, there they are. Thanks!

It turns out to be almost right. The update .sql files appear
to be links to pljava--1.5.2.sql, but that is the file used for
a new installation. ALTER EXTENSION UPDATE fails if that file is used.

There is a file in the source tree named pljava--.sql and that
one is the template for all (trivial) update scripts. The
installer jar produced by the build process simply includes that
file under all of the necessary update script names (and not
under its own name).

It would be possible to do that, or to make one of the named
update scripts a copy of it and the rest all links to that one,
etc.

Sorry for the unexpected structure.

-Chap

Reply | Threaded
Open this post in threaded view
|

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

Chapman Flack
On 01/03/19 11:25, Chapman Flack wrote:

>> On 1/2/19 2:45 PM, Devrim Gündüz wrote:
>>> Pushed 1.5.2-2 to repos, that include the .sql files.
>
> It turns out to be almost right. The update .sql files appear
> to be links to pljava--1.5.2.sql, but that is the file used for
> a new installation. ALTER EXTENSION UPDATE fails if that file is used.
>
> There is a file in the source tree named pljava--.sql and that
> one is the template for all (trivial) update scripts. The
> installer jar produced by the build process simply includes that
> file under all of the necessary update script names (and not
> under its own name).
>
> It would be possible to do that, or to make one of the named
> update scripts a copy of it and the rest all links to that one,
> etc.

Can this be fixed? As it stands in 1.5.2-2, ALTER EXTENSION UPDATE
still breaks.

Thanks,
-Chap