1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Fix subpath and subltree. Allow to return '' value.

subpath(ltree,0,0) returns ''.
This commit is contained in:
Teodor Sigaev
2003-07-18 13:27:43 +00:00
parent fd4c775481
commit 2c914937c1
2 changed files with 9 additions and 8 deletions

View File

@ -74,15 +74,15 @@ SELECT subpath('Top.Child1.Child2',0,-1);
(1 row)
SELECT subpath('Top.Child1.Child2',0,0);
subpath
-------------------
Top.Child1.Child2
subpath
---------
(1 row)
SELECT subpath('Top.Child1.Child2',1,0);
subpath
---------------
Child1.Child2
subpath
---------
(1 row)
SELECT subpath('Top.Child1.Child2',0);