Tom Lane wrote:
> Carlo Vitolo <[EMAIL PROTECTED]> writes:
> > This does not work. The error is ERROR: pg_atoi: error in "12.00": can't
> > parse ".00"
>
> What PG version are you running? It seems to work fine for me in
> current sources:
>
>
Ver. 7.1.2
>
> BTW, the way you are writing the functions seems bizarrely inefficient.
> Why not just:
>
> CREATE FUNCTION "togliscar" () RETURNS opaque AS 'BEGIN
> UPDATE magazzino
> SET quantita = quantita - NEW.quantita
> WHERE descrizione = NEW.descrizione;
> RETURN NEW;
> END;
> ' LANGUAGE 'plpgsql';
>
> regards, tom lane
Yes is better thanks!
You are right it works perfectly. It was my fault. I had another trigger on
insert and this function used an incorrect type of variable.
By the way. Is there a way to have an error message like "ERROR xxx in
Function xxx "?.
Bye!
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly