 CREATE OR REPLACE FUNCTION plow.before_update_set_waiting() RETURNS TRIGGER AS $$
 BEGIN
   NEW.int_state := 1;
+  NEW.time_updated := txTimeMillis();
   RETURN NEW;
 END
 $$


---
--- Stores runtime status for a task.  This table ensures
--- the data still exists after the process has stopped.  
---
CREATE TABLE task_dsp (
  pk_task UUID NOT NULL PRIMARY KEY,

CREATE OR REPLACE FUNCTION plow.before_update_set_depend() RETURNS TRIGGER AS $$
BEGIN
  NEW.int_state := 5;
  NEW.time_updated := txTimeMillis();
  RETURN NEW;
END
$$
