单词排序
-
PGSQL 自定义函数实现单词排序并运用于PostgreSQL 代码
``sql,CREATE OR REPLACE FUNCTION word_sort(text),RETURNS text AS $$,DECLARE, words text[];,BEGIN, words := string_to_array(lower($1), ' ');, words := array_agg(words ORDER BY words);, RETURN array_to_string(words, ' ');,END;,$$ LANGUAGE plpgsql;,,SELECT word_sort('这是一个测试字符串');,``