title: Unable to delete a row in Postgresql
body: <p>I created a small function and small trigger. When I run the simplest <code>DELETE</code> query, I only see a notice and a context message in the console (no warning and no error messages), but still this <code>DELETE</code> query has no effect (the record stays in table and is not deleted). The function and trigger look like this:</p>
  
  <pre><code>CREATE FUNCTION trigger_layers_before_del () RETURNS trigger 
  AS $$
  DECLARE
      table_name text := (SELECT concat ('layer_', OLD.id::text, '_'));
  BEGIN 
      EXECUTE '
          DROP TABLE IF EXISTS ' || quote_ident(table_name) || ' CASCADE
      ';
      RETURN NULL;
  END;
  $$ LANGUAGE  plpgsql;
  
  CREATE TRIGGER tr_layers_del_befor
  BEFORE DELETE ON layers FOR EACH ROW
  EXECUTE PROCEDURE trigger_layers_before_del();
  </code></pre>
  
  <p>And this how <code>DELETE</code> command looks like:</p>
  
  <pre><code>DELETE FROM layers where id = 31
  </code></pre>
  
  <p>So, if I run:</p>
  
  <pre><code>DELETE FROM layers WHERE id = 31;
  SELECT * FROM layers WHERE id = 31;
  </code></pre>
  
  <p>then it returns a record with <code>id = 31</code>. </p>
  
  <p>The notice says, that "table "layer_31_" does not exist, skips ...". The context message simply prints <code>EXECUTE</code> statement. So, if there are no errors, why <code>DELETE</code> command is not commited?</p>