Fix contrib/hstore_plperl to look through scalar refs.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 7594b7a53366f6c262103acd161e6fee0a30e5c2
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2018-06-18T19:55:06Z
Releases: 10.5
Fix contrib/hstore_plperl to look through scalar refs.

Bring this transform function into sync with the policy established
by commit 3a382983d.

Also, fix it to make sure that what it drills down to is indeed a
hash, and not some other kind of Perl SV.  Previously, the test
cases added here provoked crashes.

Because of the crash hazard, back-patch to 9.5 where this module
was introduced.

Discussion: https://postgr.es/m/28336.1528393969@sss.pgh.pa.us

Files

Discussion