Re: Interest in serializing composite types?
Greg Sabino Mullane <[email protected]> Mon, 25 Aug 2014 18:41:59 -0400
| Newsgroups | gmane.comp.db.postgresql.dbdpg |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Aug 25, 2014 at 12:15:29PM -0700, David E. Wheeler wrote:
> I know. What I'm suggesting is a DBD::Pg switch that auto-converts between
> /JSONB?/ values and hashes and arrays (assuming an appropriate JSON
> parser is installed).
That's already the plan. Since we know the json type oid already, we
will add a flag such that when on, json can be slung back and forth
seamlessly as arrays are now. Arrays are already fully automatic and
out the barn door, but perhaps a more generic interface such as:
$dbh->pg_automatic_convert('json');
In which 'json' can be replaced by other things down the road. Or even
allow a second arg to a user coderef/object that knows how to convert
certain things.
--
Greg Sabino Mullane [email protected]
End Point Corporation
PGP Key: 0x14964AC8
signature.asc
(application/pgp-signature, 163 B)
-----BEGIN PGP SIGNATURE----- iEYEAREDAAYFAlP7u7cACgkQvJuQZxSWSsiQbQCfa9W0vkTFN/1ZqZGAm6+3fV0/ U4sAoIpjkJsdcWuLjA2yVV3A2328H1j4 =/rb6 -----END PGP SIGNATURE-----