[GENERAL] Loop plpgsql recordset

2007-01-26 Thread Furesz Peter
Hello, How can I loop a PL/PgSQL recorset variable? The example: DECLARE v_tmp_regi RECORD; v_tmp RECORD; BEGIN SELECT * INTO v_tmp_regi FROM sulyozas_futamido sf WHERE sf.termekfajta_id= a_termekfajta_id AND sf.marka_id=a_marka_id; DELETE FROM sulyoz

Re: [GENERAL] too many trigger records found for relation "item" -

2007-01-26 Thread Furesz Peter
I have the same problem yesterday. I got this error when I try to disable the trigger in pg_catalog: UPDATE pg_catalog.pg_class SET reltriggers = 0 WHERE oid = 'foobar'::pg_catalog.regclass'; But if I disabling the trigger using this syntax: "ALTER TABLE tablename DISABLE TRIGGER triggername"

Re: [GENERAL] trigger question

2007-01-26 Thread Furesz Peter
UE'; UPDATE sulyozas SET torolve = TRUE WHERE sulyozas_id = OLD . sulyozas_id; --enabling trigger EXECUTE 'SET SESSION general.trigger_tmp=FALSE'; END IF; IF TG_OP='UPDATE' AND a_trigger_disable IS FALSE THEN --Do something here

[GENERAL] loop plpgsql recordset variable

2007-01-25 Thread Furesz Peter
Hello, How can I loop a PL/PgSQL recorset variable? The example: DECLARE v_tmp_regi RECORD; v_tmp RECORD; BEGIN SELECT * INTO v_tmp_regi FROM sulyozas_futamido sf WHERE sf.termekfajta_id= a_termekfajta_id AND sf.marka_id=a_marka_id; DELETE FROM sulyozas_fu

[GENERAL] trigger question

2007-01-18 Thread Furesz Peter
Hello, I have a table named foobar and I don't want to allow from DELETE or UPDATE its rows. I have a table as described below: foobar(foobar_id, value, is_deleted); I don't want to allow directly delete or modify the table's rows. I plan to make an on before update or delete trigger and on

[GENERAL] trigger howto question

2007-01-16 Thread Furesz Peter
Hello, I have a table named foobar and I don't want to allow from DELETE or UPDATE its rows. I have a table as described below: foobar(foobar_id, value, is_deleted); I don't want to allow directly delete or modify the table's rows. I plan to make an on before update or delete trigger and on de