Re: [HACKERS] Transform for pl/perl

2017-11-10 Thread Pavel Stehule
Hi 2017-10-24 14:27 GMT+02:00 Anthony Bykov : > There are some moments I should mention: > 1. {"1":1}::jsonb is transformed into HV {"1"=>"1"}, while > ["1","2"]::jsonb is transformed into AV ["1", "2"] > > 2. If there is a numeric value appear in jsonb, it will be

Re: [HACKERS] Transform for pl/perl

2017-10-26 Thread Robert Haas
On Tue, Oct 24, 2017 at 1:01 PM, anthony wrote: > Hello. > Please, check out jsonb transform > (https://www.postgresql.org/docs/9.5/static/sql-createtransform.html) > for pl/perl language I've implemented. Neat. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com

Re: [HACKERS] Transform for pl/perl

2017-10-24 Thread Anthony Bykov
There are some moments I should mention: 1. {"1":1}::jsonb is transformed into HV {"1"=>"1"}, while ["1","2"]::jsonb is transformed into AV ["1", "2"] 2. If there is a numeric value appear in jsonb, it will be transformed to SVnv through string (Numeric->String->SV->SVnv). Not the best solution,

[HACKERS] Transform for pl/perl

2017-10-24 Thread anthony
Hello. Please, check out jsonb transform (https://www.postgresql.org/docs/9.5/static/sql-createtransform.html) for pl/perl language I've implemented.diff --git a/contrib/Makefile b/contrib/Makefile index 8046ca4..53d44fe 100644 --- a/contrib/Makefile +++ b/contrib/Makefile @@ -75,9 +75,9 @@