[SQL] how to create a multi columns return function ?

2003-10-21 Thread jclaudio
Hi I'm moving databases from sybase to postgres. But I have difficulties in creating a postgres equivalent to the sybase stored procedures... Apparently, Postgres functions should work, but the syb stored procedures get only one parameter and return several colums Here's the code I wrote in pos

[SQL] problem with function trigger

2004-01-13 Thread jclaudio
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

[SQL] problem with function trigger

2004-01-18 Thread jclaudio
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