Re: [HACKERS] Transform for pl/perl

Aleksander Alekseev <a.alekseev@postgrespro.ru>

From: Aleksander Alekseev <a.alekseev@postgrespro.ru>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Oleg Bartunov <obartunov@gmail.com>, Anthony Bykov <a.bykov@postgrespro.ru>, Pgsql Hackers <pgsql-hackers@postgresql.org>
Date: 2017-11-15T10:20:53Z
Lists: pgsql-hackers
Hello, hackers.

> > I'm curious, how much benefit we could get from this ? There are several
> > publicly available json datasets, which can be used to measure performance
> > gaining. I have bookmarks and review datasets available from
> > http://www.sai.msu.su/~megera/postgres/files/, look at js.dump.gz and
> > jr.dump.gz
> >
> 
> I don't expect significant performance effect - it remove some
> transformations - perl object -> json | json -> jsonb - but on modern cpu
> these transformations should be fast. For me - main benefit is user comfort
> - it does direct transformation from perl object -> jsonb

I completely agree that currently the main benefit of this feature is
user comfort. So correctness is the priority. When we make sure that the
implementation is correct we can start worry about the performance.
Probably in a separate patch.

Thanks for the datasets though!

-- 
Best regards,
Aleksander Alekseev

Commits

  1. Fix jsonb_plperl to convert Perl UV values correctly.

  2. Fix contrib/hstore_plperl to look through scalar refs.

  3. Allow plperl_sv_to_datum to look through scalar refs.

  4. Fix excessive enreferencing in jsonb-to-plperl transform.