I am creating a stored procedure to update the data userid
of the table clients
based on the id of the client cid
; but so far I have not succeeded: the function does not update the userid
of the client.
CREATE OR REPLACE FUNCTION updateclient_uid(cid text,uid text) RETURNS void AS
$BODY$
BEGIN
UPDATE clients
SET userid = '@uid'
WHERE clientid = '@cid';
END;
$BODY$
LANGUAGE plpgsql VOLATILE
COST 100;
ALTER FUNCTION updateclient_uid(text, text)
OWNER TO postgres;