pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Unpack jbvBinary objects passed to pushJsonbValue 2+ messages / 1 participants [nested] [flat]
* pgsql: Unpack jbvBinary objects passed to pushJsonbValue @ 2015-05-22 14:33 Andrew Dunstan <andrew@dunslane.net> 0 siblings, 0 replies; 2+ messages in thread From: Andrew Dunstan @ 2015-05-22 14:33 UTC (permalink / raw) To: pgsql-committers Unpack jbvBinary objects passed to pushJsonbValue pushJsonbValue was accepting jbvBinary objects passed as WJB_ELEM or WJB_VALUE data. While this succeeded, when those objects were later encountered in attempting to convert the result to Jsonb, errors occurred. With this change we ghuarantee that a JSonbValue constructed from calls to pushJsonbValue does not contain any jbvBinary objects. This cures a problem observed with jsonb_delete. This means callers of pushJsonbValue no longer need to perform this unpacking themselves. A subsequent patch will perform some cleanup in that area. The error was not triggered by any 9.4 code, but this is a publicly visible routine, and so the error could be exercised by third party code, therefore backpatch to 9.4. Bug report from Peter Geoghegan, fix by me. Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/5302760a50332a684e35b9865ff47ff5fd4970c2 Modified Files -------------- src/backend/utils/adt/jsonb_util.c | 44 ++++++++++++++++++++++++++++++++---- src/include/utils/jsonb.h | 2 +- 2 files changed, 40 insertions(+), 6 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Unpack jbvBinary objects passed to pushJsonbValue @ 2015-05-22 14:33 Andrew Dunstan <andrew@dunslane.net> 0 siblings, 0 replies; 2+ messages in thread From: Andrew Dunstan @ 2015-05-22 14:33 UTC (permalink / raw) To: pgsql-committers Unpack jbvBinary objects passed to pushJsonbValue pushJsonbValue was accepting jbvBinary objects passed as WJB_ELEM or WJB_VALUE data. While this succeeded, when those objects were later encountered in attempting to convert the result to Jsonb, errors occurred. With this change we ghuarantee that a JSonbValue constructed from calls to pushJsonbValue does not contain any jbvBinary objects. This cures a problem observed with jsonb_delete. This means callers of pushJsonbValue no longer need to perform this unpacking themselves. A subsequent patch will perform some cleanup in that area. The error was not triggered by any 9.4 code, but this is a publicly visible routine, and so the error could be exercised by third party code, therefore backpatch to 9.4. Bug report from Peter Geoghegan, fix by me. Branch ------ REL9_4_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/9b74f32cdbff8b9be47fc69164eae552050509ff Modified Files -------------- src/backend/utils/adt/jsonb_util.c | 44 ++++++++++++++++++++++++++++++++---- src/include/utils/jsonb.h | 2 +- 2 files changed, 40 insertions(+), 6 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2015-05-22 14:33 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2015-05-22 14:33 pgsql: Unpack jbvBinary objects passed to pushJsonbValue Andrew Dunstan <andrew@dunslane.net> 2015-05-22 14:33 pgsql: Unpack jbvBinary objects passed to pushJsonbValue Andrew Dunstan <andrew@dunslane.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox