title: Error trigger. Trigger without return. PostgreSQL
body: <p>I created trigger and function.</p>
  
  <pre><code>CREATE TRIGGER trigger_update_quantity AFTER INSERT ON orderitem
      FOR EACH ROW EXECUTE PROCEDURE update_quantity();
  
          CREATE OR REPLACE FUNCTION update_quantity() RETURNS TRIGGER AS $quantity_update$
            DECLARE
              flower INT;
            BEGIN
              flower = New.flower_num;
              UPDATE product SET quantity = quantity - New.quantity
              WHERE flower_num = flower;
            END;
            $quantity_update$
          LANGUAGE plpgsql;
  </code></pre>
  
  <p>When I try to insert a row into a table. Everything i have the following error.</p>
  
  <pre><code>INSERT INTO "public"."orderitem" ("order_num", "flower_num", "quantity", "total_price") VALUES (?, ?, ?, ?);
  
              [2F005] ERROR: control reached end of trigger procedure without RETURN
              Where: PL/pgSQL function update_quantity()
  </code></pre>