From 54730ecf0c8fac2d34ee0b492b8ffe5ca4a8f420 Mon Sep 17 00:00:00 2001 From: Alex ORLUC <alex.orluc@maarch.org> Date: Thu, 11 May 2017 18:36:38 +0200 Subject: [PATCH] FIX #5520 add OR REPLACE in order_alphanum function --- sql/160_to_170.sql | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sql/160_to_170.sql b/sql/160_to_170.sql index 0e271b5cc5e..46fbbd9bd59 100644 --- a/sql/160_to_170.sql +++ b/sql/160_to_170.sql @@ -5,7 +5,7 @@ -- -- -- -- -- *************************************************************************-- -CREATE FUNCTION order_alphanum(text) RETURNS text AS $$ +CREATE OR REPLACE FUNCTION order_alphanum(text) RETURNS text AS $$ SELECT regexp_replace(regexp_replace(regexp_replace(regexp_replace($1, E'(^|\\D)(\\d{1,3}($|\\D))', E'\\1000\\2', 'g'), E'(^|\\D)(\\d{4,6}($|\\D))', E'\\1000\\2', 'g'), @@ -98,8 +98,6 @@ WITH ( OIDS=FALSE ); - - DROP TABLE IF EXISTS seda; CREATE TABLE seda -- GitLab