:      warehouse_db=# CREATE OR REPLACE FUNCTION sales_record_insert()     RETURNS TRIGGER AS $$     BEGIN       IF (NEW.sales_date >= DATE '0000-00-00' AND NEW.sales_date < DATE '0000-00-00') THEN         INSERT INTO sales_record_m0_to_m0 VALUES (NEW.*);       ELSEIF (NEW.sales_date >= DATE '0000-00-00' AND NEW.sales_date < DATE '0000-00-00') THEN         INSERT INTO sales_record_m0_to_m0 VALUES (NEW.*);       ELSEIF (NEW.sales_date >= DATE '0000-00-00' AND NEW.sales_date < DATE '0000-00-00') THEN         INSERT INTO sales_record_m0_to_m0 VALUES (NEW.*);       ELSEIF (NEW.sales_date >= DATE '0000-00-00' AND NEW.sales_date < DATE '0000-00-00') THEN         INSERT INTO sales_record_m0_to_m0 VALUES (NEW.*);       ELSEIF (NEW.sales_date >= DATE '0000-00-00' AND NEW.sales_date < DATE '0000-00-00') THEN         INSERT INTO sales_record_m0_to_m00 VALUES (NEW.*);       ELSEIF (NEW.sales_date >= DATE '0000-00-00' AND NEW.sales_date < DATE '0000-00-00') THEN         INSERT INTO sales_record_m0