Add String split to array function

45 views
Skip to first unread message

Christian Beikov

unread,
Feb 25, 2020, 6:03:45 PM2/25/20
to H2 Database
Hello,

it is quite easy to introduce a function for splitting a String into an array, but most of the time, one has to accept the out of the box defaults.

CREATE ALIAS regexp_split_to_array AS $$
String[] split(String value, String separator) {
    return value == null || separator == null ? null : value.split(separator);
}
$$;

Would it be possible to introduce a function like this for compatibility with PostgreSQL for the next H2 version?

Regards,
Christian
Reply all
Reply to author
Forward
0 new messages