I created a postgres sql function which perform truncate and then insert rows into table. Below is the function
CREATE OR REPLACE FUNCTION reset_Default()
RETURNS VOID AS '
BEGIN
TRUNCATE TABLE details;
INSERT INTO details values('car',2);
INSERT INTO details values('bus',4);
RETURN;
END;
' LANGUAGE 'plpgsql';
But im getting below errors
ERROR: syntax error at or near "car" LINE 6:VALUES('car',2 ^ CREATE FUNCTION
ERROR: cannot change return type of existing function
HINT: Use DROP FUNCTION first.
Can I know the reason?