Fixing reduce_dim sql function

remotes/origin/issue/4795/notification_even_they_are_disabled
Alejandro Alonso 2016-07-07 13:09:03 +02:00
parent 9911bec941
commit c3022f4f74
1 changed files with 3 additions and 0 deletions

View File

@ -21,6 +21,9 @@ class Migration(migrations.Migration):
DECLARE DECLARE
s $1%TYPE; s $1%TYPE;
BEGIN BEGIN
IF $1 = '{}' THEN
RETURN;
END IF;
FOREACH s SLICE 1 IN ARRAY $1 LOOP FOREACH s SLICE 1 IN ARRAY $1 LOOP
RETURN NEXT s; RETURN NEXT s;
END LOOP; END LOOP;