mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-18 18:44:06 +08:00
Patch for current CVS. It add test of lca() to ltree test suite.
Teodor Sigaev
This commit is contained in:
parent
683b0d3add
commit
34f03b1630
@ -107,6 +107,66 @@ select ''::ltree || 'Top.Child1.Child2'::ltree;
|
||||
Top.Child1.Child2
|
||||
(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;
|
||||
lquery
|
||||
--------
|
||||
|
@ -23,6 +23,18 @@ select 'Top_0'::ltree || 'Top.Child1.Child2'::ltree;
|
||||
select 'Top.Child1.Child2'::ltree || ''::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 '4|3|2'::lquery;
|
||||
select '1.2'::lquery;
|
||||
|
Loading…
Reference in New Issue
Block a user