- |
-
-
-
strpos (
string text ,
substring text )
- integer
-
- Returns first starting index of the specified
substring
- within
string , or zero if it's not present.
- (Same as
position(substring in
-
string ), but note the reversed
- argument order.)
-
- strpos('high', 'ig')
- 2
-
-
-
- |
-
-
-
substr (
string text ,
start integer , count integer )
- text
-
- Extracts the substring of
string starting at
- the
start 'th character,
- and extending for
count characters if that is
- specified. (Same
-
- substr('alphabet', 3)
- phabet
-
- substr('alphabet', 3, 2)
- ph
-
-
-
|
|
-
+ id="function-string-to-array">
string_to_array (
string text ,
delimiter text , null_string text )
If
null_string is supplied and is
not NULL , fields matching that string are
replaced by NULL .
+ See also array_to_string .
string_to_array('xx~~yy~~zz', '~~', 'yy')
+ |
+
+
+
strpos (
string text ,
substring text )
+ integer
+
+ Returns first starting index of the specified
substring
+ within
string , or zero if it's not present.
+ (Same as
position(substring in
+
string ), but note the reversed
+ argument order.)
+
+ strpos('high', 'ig')
+ 2
+
+
+
+ |
+
+
+
substr (
string text ,
start integer , count integer )
+ text
+
+ Extracts the substring of
string starting at
+ the
start 'th character,
+ and extending for
count characters if that is
+ specified. (Same
+
+ substr('alphabet', 3)
+ phabet
+
+ substr('alphabet', 3, 2)
+ ph
+
+
+
|
|
-
+ id="function-array-to-string">
array_to_string (
array anyarray ,
delimiter text , null_string text )
If
null_string is given and is
not NULL , then NULL array
entries are represented by that string; otherwise, they are omitted.
+ See also string_to_array .
array_to_string(ARRAY[1, 2, 3, NULL, 5], ',', '*')
-
- There are two differences in the behavior of string_to_array
- from pre-9.1 versions of
PostgreSQL .
- First, it will return an empty (zero-element) array rather
- than NULL when the input string is of zero length.
- Second, if the delimiter string is NULL , the function
- splits the input into individual characters, rather than
- returning NULL as before.
-
-
-
See also about the aggregate
function array_agg for use with arrays.