Fix lquery's behavior for consecutive '*' items.
Tom Lane <tgl@sss.pgh.pa.us>
Fix lquery's behavior for consecutive '*' items.
Something like "*{2}.*{3}" should presumably mean the same as
"*{5}", but it didn't. Improve that.
Get rid of an undocumented and remarkably ugly (though not, as far as
I can tell, actually unsafe) static variable in favor of passing more
arguments to checkCond().
Reverse-engineer some commentary. This function, like all of ltree,
is still far short of what I would consider the minimum acceptable
level of internal documentation, but at least now it has more than
zero comments.
Although this certainly seems like a bug fix, people might not
thank us for changing query behavior in stable branches, so
no back-patch.
Nikita Glukhov, with cosmetic improvements by me
Discussion: https://postgr.es/m/CAP_rww=waX2Oo6q+MbMSiZ9ktdj6eaJj0cQzNu=Ry2cCDij5fw@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| contrib/ltree/expected/ltree.out | modified | +24 −0 |
| contrib/ltree/lquery_op.c | modified | +84 −37 |
| contrib/ltree/ltree.h | modified | +11 −8 |
| contrib/ltree/sql/ltree.sql | modified | +4 −1 |
Discussion
- fix for BUG #3720: wrong results at using ltree 25 messages · 2019-03-05 → 2020-03-31