w3resource
MySQL Tutorial

PostgreSQL STRING_TO_ARRAY() function

STRING_TO_ARRAY() function

This function is used to split a string into array elements using supplied delimiter and optional null string.

Syntax:

string_to_array(text, text [, text])

Return Type:

text[]

PostgreSQL Version: 9.3

Example: PostgreSQL STRING_TO_ARRAY() function

Code:

SELECT string_to_array('xx~^~yy~^~zz', '~^~', 'yy');

Sample Output:

 string_to_array
-----------------
 {xx,NULL,zz}
(1 row)


New Content: Composer: Dependency manager for PHP, R Programming