diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2016-01-02 16:24:50 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2016-01-02 16:24:50 -0500 |
commit | 7157fe80f42476db249e062b4f6eef6a3994b234 (patch) | |
tree | 063650e70ff6414468e73164633bb2e63b0ad9b3 /src/backend/utils/adt/json.c | |
parent | df35af2ca7b5545d32b978a88b665bac2b9fa638 (diff) | |
download | postgresql-7157fe80f42476db249e062b4f6eef6a3994b234.tar.gz postgresql-7157fe80f42476db249e062b4f6eef6a3994b234.zip |
Fix overly-strict assertions in spgtextproc.c.
spg_text_inner_consistent is capable of reconstructing an empty string
to pass down to the next index level; this happens if we have an empty
string coming in, no prefix, and a dummy node label. (In practice, what
is needed to trigger that is insertion of a whole bunch of empty-string
values.) Then, we will arrive at the next level with in->level == 0
and a non-NULL (but zero length) in->reconstructedValue, which is valid
but the Assert tests weren't expecting it.
Per report from Andreas Seltenreich. This has no impact in non-Assert
builds, so should not be a problem in production, but back-patch to
all affected branches anyway.
In passing, remove a couple of useless variable initializations and
shorten the code by not duplicating DatumGetPointer() calls.
Diffstat (limited to 'src/backend/utils/adt/json.c')
0 files changed, 0 insertions, 0 deletions