Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

can't create stored procedure for postgresql db

cvb255's profile image cvb255 posted 5 years ago in Running SQL scripts Permalink

when create procedure for postgresql

CREATE OR REPLACE FUNCTION func_test(code integer) RETURNS INTEGER AS $$

BEGIN

return 1;

END; $$ LANGUAGE plpgsql;

1 attachment(s):
  • HeidiSQL_9.4_ERROR
ansgar's profile image ansgar posted 5 years ago Permalink

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.




Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.