Postgresql Stynax Error Creating Function
I am creating a function in my PostgreSQL but I'm getting this syntax error and I ran out of ideas what could be wrong... Please assist. CREATE OR REPLACE FUNCTION get_docName(IN p
Solution 1:
You're trying to use PL/PgSQL syntax in an SQL function. You also forgot the semicolon on the end of the SELECT.
Declare it LANGUAGE plpgsql. Or, as the function is so trivial, just turn it into valid sql function syntax by replacing the body with:
$BODY$
SELECT name *FROM (documents) where id=p_docId;
$BODY$
though the SQL statement its self is also invalid - name *?
Post a Comment for "Postgresql Stynax Error Creating Function"