summaryrefslogtreecommitdiff
path: root/contrib/ltree/expected
diff options
context:
space:
mode:
authorAlexander Korotkov2023-04-23 10:58:25 +0000
committerAlexander Korotkov2023-04-23 11:30:09 +0000
commit8bbd0cce92be98de9f4f727b8bf66fe26e5831ea (patch)
tree4b43130fd13ea7a0ffe36e56da62ac872b64cd77 /contrib/ltree/expected
parentcd115c3530bd59bb0305d62ccef1c9504207ff4c (diff)
Validate ltree siglen GiST option to be int-alignedHEADmaster
Unaligned siglen could lead to an unaligned access to subsequent key fields. Backpatch to 13, where opclass options were introduced. Reported-by: Alexander Lakhin Bug: 17847 Discussion: https://postgr.es/m/17847-171232970bea406b%40postgresql.org Reviewed-by: Tom Lane, Pavel Borisov, Alexander Lakhin Backpatch-through: 13
Diffstat (limited to 'contrib/ltree/expected')
-rw-r--r--contrib/ltree/expected/ltree.out9
1 files changed, 7 insertions, 2 deletions
diff --git a/contrib/ltree/expected/ltree.out b/contrib/ltree/expected/ltree.out
index 27122153c7..984cd030cf 100644
--- a/contrib/ltree/expected/ltree.out
+++ b/contrib/ltree/expected/ltree.out
@@ -7835,10 +7835,15 @@ SELECT * FROM ltreetest WHERE t ? '{23.*.1,23.*.2}' order by t asc;
drop index tstidx;
create index tstidx on ltreetest using gist (t gist_ltree_ops(siglen=0));
ERROR: value 0 out of bounds for option "siglen"
-DETAIL: Valid values are between "1" and "2024".
+DETAIL: Valid values are between "4" and "2024".
create index tstidx on ltreetest using gist (t gist_ltree_ops(siglen=2025));
ERROR: value 2025 out of bounds for option "siglen"
-DETAIL: Valid values are between "1" and "2024".
+DETAIL: Valid values are between "4" and "2024".
+create index tstidx on ltreetest using gist (t gist_ltree_ops(siglen=2028));
+ERROR: value 2028 out of bounds for option "siglen"
+DETAIL: Valid values are between "4" and "2024".
+create index tstidx on ltreetest using gist (t gist_ltree_ops(siglen=2019));
+ERROR: siglen value must be a multiple of 4
create index tstidx on ltreetest using gist (t gist_ltree_ops(siglen=2024));
SELECT count(*) FROM ltreetest WHERE t < '12.3';
count