Postgresql – Where is the syntax error in this code and how to fix it?
enter image description here What is causing the error here? If I'm not confusing anything, everything is done as it should CREATE FUNCTION convert_temperature(temperature real, current_scale varchar DEFAULT 'Fahrenheit') RETURNS real AS $$ BEGIN IF(current_scale = 'Celsius') THEN RETURN temperatue*1.8+32…