when create procedure for postgresql
CREATE OR REPLACE FUNCTION func_test(code integer) RETURNS INTEGER AS $$
BEGIN
return 1;
END; $$ LANGUAGE plpgsql;
You are using semicolon in the procedure code itself, and HeidiSQL splits queries at these places. So you are actually executing the code up to and including "return 1". You need to add such a line above the whole query:
DELIMITER //
CREATE OR REPLACE ...
Don't forget to reset the delimiter afterwards:
DELIMITER ;
Please login to leave a reply, or register at first.