   attribute RECORD;
 BEGIN
   LOCK TABLE provenance_circuit_gate;
-  INSERT INTO provenance_circuit_gate VALUES (NEW.provsql, 'input');
-  RETURN NEW;
+  INSERT INTO provenance_circuit_gate VALUES (NEW.provsql, 'input'); 
+  RETURN NEW; 
 END
 $$ LANGUAGE plpgsql SET search_path=provsql,pg_temp SECURITY DEFINER;
 

      EXCEPTION WHEN unique_violation THEN
      END;
  END CASE;
  RETURN times_token;
END
$$ LANGUAGE plpgsql SET search_path=provsql,pg_temp,public SECURITY DEFINER;

$$
DECLARE
  times_token uuid;
--  ts timestamptz;
BEGIN
--  ts := clock_timestamp();

  CASE array_length(tokens,1)
    WHEN 0 THEN
      times_token:=gate_one();
