Details
-
New Feature
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
Function Definition
text substr(string text, from int4 [, count int4])
Description
- It extracts substring (same as substring(string from from for count)).
- If string is null, the result also should be null.
- Note that from is one based index.
- from can be negative integer.
- count can be omitted. If then, all string after from will be returned.
- count cannot be negative integer.
- If count is 0, the result should be '' instead of null.
Example and Sementic
hyunsik=> select substr('abcdef', 3, 2); substr -------- cd (1 row) hyunsik=> select substr('abcdef',3) ; substr -------- cdef (1 row) hyunsik=> select substr('abcdef',1,1) ; substr -------- a (1 row) hyunsik=> select substr('abcdef',0,1) ; substr -------- (1 row) hyunsik=> select substr('abcdef',0,2) ; substr -------- a (1 row)
Attachments
Attachments
Issue Links
- relates to
-
TAJO-344 Tajo cannot recognize negative numeric expressions
- Resolved