Re: pgsql: Transforms for jsonb to PL/Perl

2018-04-04 Thread Tom Lane
I wrote: > Anthony Bykov writes: >> I guess the right test will look a little bit different: >> CREATE FUNCTION testRegexpToJsonb() RETURNS jsonb >> LANGUAGE plperl >> TRANSFORM FOR TYPE jsonb >> AS $$ >> $a = qr//; >> return ($a); >> $$; > This is testing something else.

Re: pgsql: Transforms for jsonb to PL/Perl

2018-04-04 Thread Tom Lane
Anthony Bykov writes: > Tom Lane wrote: >> This results in one change in the module's test results: the example >> that thinks it's returning a regexp match result no longer fails, >> but just returns the scalar result (0). I'm inclined to think that

Re: pgsql: Transforms for jsonb to PL/Perl

2018-04-04 Thread Anthony Bykov
On Tue, 03 Apr 2018 17:37:04 -0400 Tom Lane wrote: > I wrote: > > Hm, it fails on my own machine too (RHEL6, perl 5.10.1), with the > > same "cannot transform this Perl type to jsonb" symptoms. A bit > > of tracing shows that SvTYPE(in) is returning SVt_PVIV in some > > of

Re: pgsql: Transforms for jsonb to PL/Perl

2018-04-04 Thread Anthony Bykov
On Tue, 03 Apr 2018 17:37:04 -0400 Tom Lane wrote: > I wrote: > > Hm, it fails on my own machine too (RHEL6, perl 5.10.1), with the > > same "cannot transform this Perl type to jsonb" symptoms. A bit > > of tracing shows that SvTYPE(in) is returning SVt_PVIV in some > > of

Re: pgsql: Transforms for jsonb to PL/Perl

2018-04-03 Thread Tom Lane
I wrote: > Hm, it fails on my own machine too (RHEL6, perl 5.10.1), with the > same "cannot transform this Perl type to jsonb" symptoms. A bit > of tracing shows that SvTYPE(in) is returning SVt_PVIV in some > of the failing cases, and SVt_PVNV in others. I tried to fix this by reducing the

Re: pgsql: Transforms for jsonb to PL/Perl

2018-04-03 Thread Tom Lane
I wrote: > Peter Eisentraut writes: >> Transforms for jsonb to PL/Perl > Buildfarm's not terribly happy with this. Hm, it fails on my own machine too (RHEL6, perl 5.10.1), with the same "cannot transform this Perl type to jsonb" symptoms. A bit of tracing shows that SvTYPE(in)