mirror of
https://github.com/postgres/postgres.git
synced 2026-05-27 03:42:28 -04:00
subpath(ltree,offset,len) now correctly errors when given an offset less than -n, where n is the number of labels in the given ltree. There was a duplicate block of code that allowed an offset as low as -2n. The documentation says no such thing, so this must have been a copy-and-paste error in the original ltree patch. While here, avoid redundant calculation of "end" and write LTREE_MAX_LEVELS rather than its hard-coded value. Author: Marcus Gartner <m.a.gartner@gmail.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/CAAUGV_SvBO9gWYbaejb9nhe-mS9FkNP4QADNTdM3wdRhvLobwA@mail.gmail.com |
||
|---|---|---|
| .. | ||
| data | ||
| expected | ||
| sql | ||
| .gitignore | ||
| _ltree_gist.c | ||
| _ltree_op.c | ||
| crc32.c | ||
| crc32.h | ||
| lquery_op.c | ||
| ltree--1.0--1.1.sql | ||
| ltree--1.1--1.2.sql | ||
| ltree--1.1.sql | ||
| ltree--1.2--1.3.sql | ||
| ltree.control | ||
| ltree.h | ||
| ltree_gist.c | ||
| ltree_io.c | ||
| ltree_op.c | ||
| ltreetest.sql | ||
| ltxtquery_io.c | ||
| ltxtquery_op.c | ||
| Makefile | ||
| meson.build | ||