pgq.maint_operations: include londiste.periodic_maintenance
authorMarko Kreen <markokr@gmail.com>
Mon, 9 Jul 2012 09:49:25 +0000 (12:49 +0300)
committerMarko Kreen <markokr@gmail.com>
Mon, 9 Jul 2012 09:49:25 +0000 (12:49 +0300)
sql/pgq/functions/pgq.maint_operations.sql

index 31c44ba3567b871b005c3334008492eaacdac223..5ddb26fa0b3f6a3c1341f83e139bc679e62d1a1a 100644 (file)
@@ -113,6 +113,16 @@ begin
         end loop;
     end if;
 
+    perform 1 from pg_proc p, pg_namespace n
+      where p.pronamespace = n.oid
+        and n.nspname = 'londiste'
+        and p.proname = 'periodic_maintenance';
+    if found then
+        func_name := 'londiste.periodic_maintenance';
+        func_arg := NULL;
+        return next;
+    end if;
+
     return;
 end;
 $$ language plpgsql;