Im having problems with my insert stored function when called from my java c
ode (works fine when called in pgsql).
Very new to this, and just cant seem to figure out what the problem is...
here is an example of my stored function:
CREATE OR REPLACE FUNCTION test (integer,integer) RETURNS INTEGER As $$
rid ALIAS FOR $1;
rval ALIAS FOR $2;
INSERT INTO test (col, col2) VALUES (rid, rval);
GET DIAGNOSTICS results := ROW_COUNT;
IF results = 0 THEN
RAISE EXCEPTION 'Error adding additional record.';
$$ language 'plpgsql';