Hello,

In PostgreSQL 8.0.1 (plpgsql), I was trying to use array in the trigger function.

DECLARE
      clear_id_colValueArr    VARCHAR[100];
BEGIN
      clear_id_colValueArr[1] := NEW.clear_id1;
      clear_id_colValueArr[2] := NEW.clear_id2;
      clear_id_colValueArr[3] := NEW.clear_id3;
....
      clear_id_colValueArr[100] := NEW.clear_id100;
...
END;

I always get NULL for clear_id_colValueArr. Also, I tried to run
raise notice '%', clear_id_colValueArr[0], I got an compile error.

Could someone tell me how to use array in a trigger function please?

Also, is there a way that I can get NEW.ColValues by specifying column number but not NEW.ColumnName?

Thanks a lot,
Ying



---------------------------(end of broadcast)---------------------------
TIP 1: 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

Reply via email to