Re: [SQL] Help with Procedures in pgsql

2000-11-30 Thread Robert B. Easter
On Monday 27 November 2000 15:01, Nelio Alves Pereira Filho wrote: > I have the folowing procedure in PL/pgsql: > > CREATE FUNCTION set_counter () RETURNS INT AS ' > DECLARE > nivel_rec record; > new_count integer; I always used the syntax like: nivel_rec nivel%ROWTYPE; Not

[SQL] Help with Procedures in pgsql

2000-11-30 Thread Nelio Alves Pereira Filho
I have the folowing procedure in PL/pgsql: CREATE FUNCTION set_counter () RETURNS INT AS ' DECLARE nivel_rec record; new_count integer; BEGIN UPDATE nivel SET count=-2; FOR nivel_rec IN SELECT * FROM nivel LOOP new_count := set_counter_row (nivel_