pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix the fastpath rule for jsonb_concat with an empty operand.
2+ messages / 1 participants
[nested] [flat]

* pgsql: Fix the fastpath rule for jsonb_concat with an empty operand.
@ 2015-09-13 21:15 Andrew Dunstan <andrew@dunslane.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Andrew Dunstan @ 2015-09-13 21:15 UTC (permalink / raw)
  To: pgsql-committers

Fix the fastpath rule for jsonb_concat with an empty operand.

To prevent perverse results, we now only return the other operand if
it's not scalar, and if both operands are of the same kind (array or
object).

Original bug complaint and patch from Oskari Saarenmaa, extended by me
to cover the cases of different kinds of jsonb.

Backpatch to 9.5 where jsonb_concat was introduced.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/e7e3ac2d51130d707792e657facc58c160182342

Modified Files
--------------
src/backend/utils/adt/jsonfuncs.c     |   16 ++++++++++-----
src/test/regress/expected/jsonb.out   |   36 +++++++++++++++++++++++++++++++++
src/test/regress/expected/jsonb_1.out |   36 +++++++++++++++++++++++++++++++++
src/test/regress/sql/jsonb.sql        |    7 +++++++
4 files changed, 90 insertions(+), 5 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: Fix the fastpath rule for jsonb_concat with an empty operand.
@ 2015-09-13 21:15 Andrew Dunstan <andrew@dunslane.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Andrew Dunstan @ 2015-09-13 21:15 UTC (permalink / raw)
  To: pgsql-committers

Fix the fastpath rule for jsonb_concat with an empty operand.

To prevent perverse results, we now only return the other operand if
it's not scalar, and if both operands are of the same kind (array or
object).

Original bug complaint and patch from Oskari Saarenmaa, extended by me
to cover the cases of different kinds of jsonb.

Backpatch to 9.5 where jsonb_concat was introduced.

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/f243072a9ca3d135745441ab016996a00d183bd2

Modified Files
--------------
src/backend/utils/adt/jsonfuncs.c     |   16 ++++++++++-----
src/test/regress/expected/jsonb.out   |   36 +++++++++++++++++++++++++++++++++
src/test/regress/expected/jsonb_1.out |   36 +++++++++++++++++++++++++++++++++
src/test/regress/sql/jsonb.sql        |    7 +++++++
4 files changed, 90 insertions(+), 5 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-09-13 21:15 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-09-13 21:15 pgsql: Fix the fastpath rule for jsonb_concat with an empty operand. Andrew Dunstan <andrew@dunslane.net>
2015-09-13 21:15 pgsql: Fix the fastpath rule for jsonb_concat with an empty operand. 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