londiste.local_add_table: skip empty arg array
authorMarko Kreen <markokr@gmail.com>
Fri, 26 Nov 2010 11:51:59 +0000 (13:51 +0200)
committerMarko Kreen <markokr@gmail.com>
Mon, 29 Nov 2010 12:56:16 +0000 (14:56 +0200)
sql/londiste/functions/londiste.local_add_table.sql

index c6ad29820c2db0c62a55e4b5ea4b26cccb93a1fe..46d88fe34a75660ebc9ae13b3bf206bff62d13df 100644 (file)
@@ -141,7 +141,7 @@ begin
         lg_pos := 'after';
 
         -- parse extra args
-        if i_trg_args is not null then
+        if array_length(i_trg_args, 1) > 0 then
             for i in array_lower(i_trg_args, 1) .. array_upper(i_trg_args, 1) loop
                 arg := i_trg_args[i];
                 if arg like 'tgflags=%' then