text: CREATE FUNCTION extended_sales(p_itemno int)
  RETURNS TABLE(quantity int, total numeric) AS $$
  BEGIN
      RETURN QUERY SELECT s.quantity, s.quantity * s.price FROM sales AS s
                   WHERE s.itemno = p_itemno;
  END;
  $$ LANGUAGE plpgsql;
  