mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
Please, apply patch for contrib/ltree to current CVS and 7.3.2
CHANGES Mar 28, 2003 Added finctions index(ltree,ltree,offset), text2ltree(text), ltree2text(text) Teodor Sigaev
This commit is contained in:
@ -1,12 +1,12 @@
|
||||
\set ECHO none
|
||||
psql:ltree.sql:9: NOTICE: ProcedureCreate: type ltree is not yet defined
|
||||
psql:ltree.sql:14: NOTICE: Argument type "ltree" is only a shell
|
||||
psql:ltree.sql:281: NOTICE: ProcedureCreate: type lquery is not yet defined
|
||||
psql:ltree.sql:286: NOTICE: Argument type "lquery" is only a shell
|
||||
psql:ltree.sql:392: NOTICE: ProcedureCreate: type ltxtquery is not yet defined
|
||||
psql:ltree.sql:397: NOTICE: Argument type "ltxtquery" is only a shell
|
||||
psql:ltree.sql:459: NOTICE: ProcedureCreate: type ltree_gist is not yet defined
|
||||
psql:ltree.sql:464: NOTICE: Argument type "ltree_gist" is only a shell
|
||||
psql:ltree.sql:301: NOTICE: ProcedureCreate: type lquery is not yet defined
|
||||
psql:ltree.sql:306: NOTICE: Argument type "lquery" is only a shell
|
||||
psql:ltree.sql:412: NOTICE: ProcedureCreate: type ltxtquery is not yet defined
|
||||
psql:ltree.sql:417: NOTICE: Argument type "ltxtquery" is only a shell
|
||||
psql:ltree.sql:479: NOTICE: ProcedureCreate: type ltree_gist is not yet defined
|
||||
psql:ltree.sql:484: NOTICE: Argument type "ltree_gist" is only a shell
|
||||
SELECT ''::ltree;
|
||||
ltree
|
||||
-------
|
||||
@ -31,6 +31,18 @@ SELECT '1.2._3'::ltree;
|
||||
1.2._3
|
||||
(1 row)
|
||||
|
||||
SELECT ltree2text('1.2.3.34.sdf');
|
||||
ltree2text
|
||||
--------------
|
||||
1.2.3.34.sdf
|
||||
(1 row)
|
||||
|
||||
SELECT text2ltree('1.2.3.34.sdf');
|
||||
text2ltree
|
||||
--------------
|
||||
1.2.3.34.sdf
|
||||
(1 row)
|
||||
|
||||
SELECT subltree('Top.Child1.Child2',1,2);
|
||||
subltree
|
||||
----------
|
||||
@ -85,6 +97,114 @@ SELECT subpath('Top.Child1.Child2',1);
|
||||
Child1.Child2
|
||||
(1 row)
|
||||
|
||||
SELECT index('1.2.3.4.5.6','1.2');
|
||||
index
|
||||
-------
|
||||
0
|
||||
(1 row)
|
||||
|
||||
SELECT index('a.1.2.3.4.5.6','1.2');
|
||||
index
|
||||
-------
|
||||
1
|
||||
(1 row)
|
||||
|
||||
SELECT index('a.1.2.3.4.5.6','1.2.3');
|
||||
index
|
||||
-------
|
||||
1
|
||||
(1 row)
|
||||
|
||||
SELECT index('a.1.2.3.4.5.6','1.2.3.j');
|
||||
index
|
||||
-------
|
||||
-1
|
||||
(1 row)
|
||||
|
||||
SELECT index('a.1.2.3.4.5.6','1.2.3.j.4.5.5.5.5.5.5');
|
||||
index
|
||||
-------
|
||||
-1
|
||||
(1 row)
|
||||
|
||||
SELECT index('a.1.2.3.4.5.6','1.2.3');
|
||||
index
|
||||
-------
|
||||
1
|
||||
(1 row)
|
||||
|
||||
SELECT index('a.1.2.3.4.5.6','6');
|
||||
index
|
||||
-------
|
||||
6
|
||||
(1 row)
|
||||
|
||||
SELECT index('a.1.2.3.4.5.6','6.1');
|
||||
index
|
||||
-------
|
||||
-1
|
||||
(1 row)
|
||||
|
||||
SELECT index('a.1.2.3.4.5.6','5.6');
|
||||
index
|
||||
-------
|
||||
5
|
||||
(1 row)
|
||||
|
||||
SELECT index('0.1.2.3.5.4.5.6','5.6');
|
||||
index
|
||||
-------
|
||||
6
|
||||
(1 row)
|
||||
|
||||
SELECT index('0.1.2.3.5.4.5.6.8.5.6.8','5.6',3);
|
||||
index
|
||||
-------
|
||||
6
|
||||
(1 row)
|
||||
|
||||
SELECT index('0.1.2.3.5.4.5.6.8.5.6.8','5.6',6);
|
||||
index
|
||||
-------
|
||||
6
|
||||
(1 row)
|
||||
|
||||
SELECT index('0.1.2.3.5.4.5.6.8.5.6.8','5.6',7);
|
||||
index
|
||||
-------
|
||||
9
|
||||
(1 row)
|
||||
|
||||
SELECT index('0.1.2.3.5.4.5.6.8.5.6.8','5.6',-7);
|
||||
index
|
||||
-------
|
||||
6
|
||||
(1 row)
|
||||
|
||||
SELECT index('0.1.2.3.5.4.5.6.8.5.6.8','5.6',-4);
|
||||
index
|
||||
-------
|
||||
9
|
||||
(1 row)
|
||||
|
||||
SELECT index('0.1.2.3.5.4.5.6.8.5.6.8','5.6',-3);
|
||||
index
|
||||
-------
|
||||
9
|
||||
(1 row)
|
||||
|
||||
SELECT index('0.1.2.3.5.4.5.6.8.5.6.8','5.6',-2);
|
||||
index
|
||||
-------
|
||||
-1
|
||||
(1 row)
|
||||
|
||||
SELECT index('0.1.2.3.5.4.5.6.8.5.6.8','5.6',-20000);
|
||||
index
|
||||
-------
|
||||
6
|
||||
(1 row)
|
||||
|
||||
SELECT 'Top.Child1.Child2'::ltree || 'Child3'::text;
|
||||
?column?
|
||||
--------------------------
|
||||
|
Reference in New Issue
Block a user