age
age copied to clipboard
agtype to jsonb conversion
Hello, everyone.
I'd like to have an agtype to jsonb conversion, so I would be able to write less complicated sql or use Postgresql drivers. It was mentioned in docs that agtype is quite close to jsonb, so would such conversion be fast enough for large objects?
AGTYPE is based on JSONB and uses modified PG routines for JSONB. So, it is as fast as JSONB. However, it contains some additions to JSONB so it is not 1 to 1. There are functions available for typecasting some items back and forth between AGTYPE and PG datatypes.
If by complicated SQL you mean the wrapping SQL,... that is due to the nature of PG extensions and what we can and cannot do. It is also why we need to use a container datatype like AGTYPE.
Hi! JSONB functions have evolved in the last years, so fast as AGE... And perhaps it's time to look back and review (or fork) the compatibility goals between AGE framework and JSONB.
There are a fast, secure and orthogonal (reversible) typecasting between AGTYPE and JSONB?
@jrgemignani can you list here? For:
- Cast-performance discussion
- Functional redundancy discussion
@ppKrauss can you share how JSONB functions have evolved in the past few years? This might be useful in seeing what changes we can/should make. Thanks~