Hi,
I'm having a problem at a code which worked already and now after installing the new postgresql version it doesn't work (i didnt check it actually for about 2-3 months but i didnt change anything in the meanwhile).
the problem occur only with functions which i created and the error which it gives me is (all of the functions get the same error) -
Warning: PostgreSQL query failed: ERROR: Function insert_new_field(integer, "unknown", "unknown") does not exist Unable to identify a function that satisfies the given argument types You may need to add explicit typecasts.
now i echoed the sql line itself and its -
SELECT insert_new_field(24, '2', '2');
while the function code itself is -
CREATE
FUNCTION public.insert_new_field(int2, text, text) RETURNS text AS ' DECLARE
v_prod_id ALIAS FOR $1;
v_property ALIAS FOR $2;
v_value ALIAS FOR $3;
row_data fields%ROWTYPE;
BEGIN
FOR row_data IN
SELECT * FROM fields WHERE prod_id = v_prod_id LOOP IF row_data.property = v_property THEN
RAISE EXCEPTION ''Error: This property already exist at the DB'';
END
IF;END
LOOP; INSERT
INTO fields (prod_id, property, value) VALUES (v_prod_id, v_property, v_value);
RETURN ''Done'';
END;'
LANGUAGE 'plpgsql' VOLATILE;btw what's that volatile? and y it added to my function name "public." at her start name (i did tried to call the function with adding that name without any diffrent error)
can anyone help me here?
thx in advance
Yonatan
-----
"My friends worth gold to me, so i prefer to sell them and get rich!"