Hi I'm trying to update a table column with a pl/pgsql function and a trigger.
But I didn't managed to make it work so far.
Here's my function code :
CREATE FUNCTION public.calcul_impact() RETURNS opaque AS '
DECLARE
id_line integer;
quantity integer;
single_price real;
total_cost real;
am
>
> Hi I'm trying to update a table column with a pl/pgsql function and a
> trigger.
> But I didn't managed to make it work so far.
>
> Here's my function code :
>
> CREATE FUNCTION public.calcul_impact() RETURNS opaque AS '
>
> DECLARE
> id_line integer;
> quantity integer;
> single_price
Hi I'm trying to update a table column with a pl/pgsql function and a trigger.
But I didn't managed to make it work so far.
Here's my function code :
CREATE FUNCTION public.calcul_impact() RETURNS opaque AS '
DECLARE
id_line integer;
quantity integer;
single_price real;
total_cost real;
a
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 fu
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:
regression=# create table magazzino (quantita numeric(10,2),
regression(# descrizio
This does not work. The error is ERROR: pg_atoi: error in "12.00": can't
parse ".00"
CREATE FUNCTION "togliscar" () RETURNS opaque AS 'BEGIN
UPDATE magazzino SET quantita = (SELECT quantita FROM magazzino WHERE
descrizione = NEW.descrizione )
- NEW.quantita WHERE descrizione = NEW.descrizione;
RE