I am trying to create a function in PostgreSQL using this query:
create function cs.has_double_bridge(cs.nose_bridge_type) returns boolean as $$
return $1 = 'double bridge';
$$ language plpgsql stable;
But I keep getting an error on the second line:
ERROR: syntax error at or near "return"
LINE 2: return $1 = 'keyhole';
^
I am not an expert in PostgreSQL, so I haven't been able to figure out the cause of the error. What am I doing wrong here?