carMAN
31-08-2005, 12:05
ciao a tutti.
ho un problema con questa function postgre:
CREATE OR REPLACE FUNCTION "public"."pkg_mng_users_change_user_password" (varchar, varchar) RETURNS varchar AS
$body$
declare
p_id int8;
begin
select id_icc_user into p_id from icc_user where username=$2;
update icc_user
set password=$1,
change_password='F'
where id_icc_user=p_id;
return p_id::varchar;
end;
$body$
LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY DEFINER;
Quando la eseguo non ho errori di compilazione ma ottengo sempre null come risultato e l'update non viene eseguito per qualsiasi valore.
Sapete com aiutarmi ?
Grazie in anticipo.
ho un problema con questa function postgre:
CREATE OR REPLACE FUNCTION "public"."pkg_mng_users_change_user_password" (varchar, varchar) RETURNS varchar AS
$body$
declare
p_id int8;
begin
select id_icc_user into p_id from icc_user where username=$2;
update icc_user
set password=$1,
change_password='F'
where id_icc_user=p_id;
return p_id::varchar;
end;
$body$
LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY DEFINER;
Quando la eseguo non ho errori di compilazione ma ottengo sempre null come risultato e l'update non viene eseguito per qualsiasi valore.
Sapete com aiutarmi ?
Grazie in anticipo.