Update app_defaults.php
Change destination encoding from ASCII to UTF8 in convert_to function, used inside pgsql natural_sort function on Extensions page.
This commit is contained in:
parent
1b3f740568
commit
f8b6ba17c0
|
|
@ -82,7 +82,7 @@
|
|||
if ($db_type == 'pgsql') {
|
||||
$sql = "create or replace function natural_sort(text)\n";
|
||||
$sql .= " returns bytea language sql immutable strict as \$f\$\n";
|
||||
$sql .= " select string_agg(convert_to(coalesce(r[2], length(length(r[1])::text) || length(r[1])::text || r[1]), 'SQL_ASCII'),'\\x00')\n";
|
||||
$sql .= " select string_agg(convert_to(coalesce(r[2], length(length(r[1])::text) || length(r[1])::text || r[1]), 'UTF8'),'\\x00')\n";
|
||||
$sql .= " from regexp_matches(\$1, '0*([0-9]+)|([^0-9]+)', 'g') r;\n";
|
||||
$sql .= "\$f\$;";
|
||||
$database = new database;
|
||||
|
|
@ -92,4 +92,4 @@
|
|||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue