Commit 34f03b16 authored by Bruce Momjian's avatar Bruce Momjian

Patch for current CVS. It add test of lca() to ltree test suite.

Teodor Sigaev
parent 683b0d3a
...@@ -107,6 +107,66 @@ select ''::ltree || 'Top.Child1.Child2'::ltree; ...@@ -107,6 +107,66 @@ select ''::ltree || 'Top.Child1.Child2'::ltree;
Top.Child1.Child2 Top.Child1.Child2
(1 row) (1 row)
select lca('{la.2.3,1.2.3.4.5.6,}') is null;
?column?
----------
t
(1 row)
select lca('{la.2.3,1.2.3.4.5.6}') is null;
?column?
----------
f
(1 row)
select lca('{1.la.2.3,1.2.3.4.5.6}');
lca
-----
1
(1 row)
select lca('{1.2.3,1.2.3.4.5.6}');
lca
-----
1.2
(1 row)
select lca('1.la.2.3','1.2.3.4.5.6');
lca
-----
1
(1 row)
select lca('1.2.3','1.2.3.4.5.6');
lca
-----
1.2
(1 row)
select lca('1.2.2.3','1.2.3.4.5.6');
lca
-----
1.2
(1 row)
select lca('1.2.2.3','1.2.3.4.5.6','');
lca
-----
(1 row)
select lca('1.2.2.3','1.2.3.4.5.6','2');
lca
-----
(1 row)
select lca('1.2.2.3','1.2.3.4.5.6','1');
lca
-----
(1 row)
select '1'::lquery; select '1'::lquery;
lquery lquery
-------- --------
......
...@@ -23,6 +23,18 @@ select 'Top_0'::ltree || 'Top.Child1.Child2'::ltree; ...@@ -23,6 +23,18 @@ select 'Top_0'::ltree || 'Top.Child1.Child2'::ltree;
select 'Top.Child1.Child2'::ltree || ''::ltree; select 'Top.Child1.Child2'::ltree || ''::ltree;
select ''::ltree || 'Top.Child1.Child2'::ltree; select ''::ltree || 'Top.Child1.Child2'::ltree;
select lca('{la.2.3,1.2.3.4.5.6,}') is null;
select lca('{la.2.3,1.2.3.4.5.6}') is null;
select lca('{1.la.2.3,1.2.3.4.5.6}');
select lca('{1.2.3,1.2.3.4.5.6}');
select lca('1.la.2.3','1.2.3.4.5.6');
select lca('1.2.3','1.2.3.4.5.6');
select lca('1.2.2.3','1.2.3.4.5.6');
select lca('1.2.2.3','1.2.3.4.5.6','');
select lca('1.2.2.3','1.2.3.4.5.6','2');
select lca('1.2.2.3','1.2.3.4.5.6','1');
select '1'::lquery; select '1'::lquery;
select '4|3|2'::lquery; select '4|3|2'::lquery;
select '1.2'::lquery; select '1.2'::lquery;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment