Re: [ltree] Should `SELECT LCA('1.2', '1.2.3');` return '1.2' insteadof '1'? - Mailing list pgsql-bugs

From Julien Grillot
Subject Re: [ltree] Should `SELECT LCA('1.2', '1.2.3');` return '1.2' insteadof '1'?
Date
Msg-id CAKnjZ0+5kqS=2oB2=omZN93wYYY2BfQ0M8rnmpSg4o_OUVpGMg@mail.gmail.com
Whole thread Raw
In response to Re: [ltree] Should `SELECT LCA('1.2', '1.2.3');` return '1.2' insteadof '1'?  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-bugs
2017-12-01 17:17 GMT+01:00 David G. Johnston : > ​[…] Adding a leading (due to varargs) boolean argument that specifies > "end node is ancestor of itself" behavior might be a workable solution. > > Regardless, the docs should be clarified on this point, though, and maybe > add a code comment somewhere. > I understand the importance not to break existing usages. It would be perfect to have a boolean to specify that – and to clarify the docs, since the example given does not reveal this behavior https://www.postgresql.org/docs/9.1/static/ltree.html#LTREE-FUNC-TABLE I digged inside the source code and ended at `contrib/ltree/ltree_op.c:406` but I don't feel able to do the patch.

pgsql-bugs by date:

Previous
From: Adrian Vondendriesch
Date:
Subject: Re: Postgres installation issue
Next
From: Tomas Vondra
Date:
Subject: Re: BUG #14940: Duplicated records inspite of primary key and uniqueconstraint