]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Yet another ltree fix for REL_18_STABLE.
authorJeff Davis <jdavis@postgresql.org>
Thu, 26 Feb 2026 23:19:31 +0000 (15:19 -0800)
committerJeff Davis <jdavis@postgresql.org>
Thu, 26 Feb 2026 23:19:31 +0000 (15:19 -0800)
Fix buildfarm failure from code that's only present in version 18,
introduced by commit b3c2a3d386.

Reported-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/739010.1772142042@sss.pgh.pa.us

contrib/ltree/lquery_op.c

index f50cfc334c4234dafdb97e975395f3328411bb15..e15e726ad09d7df4e06d0dbfe070d3487311ce3c 100644 (file)
@@ -101,7 +101,7 @@ ltree_label_match(const char *pred, size_t pred_len, const char *label,
 
        if (locale->ctype_is_c)
        {
-               if (pred_len > label_len)
+               if (pred_len > label_len || (!prefix && pred_len != label_len))
                        return false;
 
                for (int i = 0; i < pred_len; i++)