java - PostgreSQL: An error occured in SQL statement: ERROR: syntax error at or near "RETURNING" -
i've created stored procedure works when using command line , db manager (dbeaver).
create or replace function scores(int, int, int) returns void $$ begin if exists (select * tab_scores pk_id = $1) update tab_scores set score = score + $2, most_recent_level = $3 pk_id = $1; else insert tab_scores(int, int, int) values ($1, $2, $3); end if; end; $$ language plpgsql; when attempt call procedure through java following error:
an error occured in sql statement: error: syntax error @ or near "returning" position: 38
i've looked around , can't find solution this. using postgresql-9.2 jdbc
Comments
Post a Comment