plpgsql, insert with wariables in function triggered - Mailing list pgsql-general

From Marcin Mazurek
Subject plpgsql, insert with wariables in function triggered
Date
Msg-id 20001016182003.B3386@poznan.mtl.pl
Whole thread Raw
Responses Re: plpgsql, insert with wariables in function triggered  (Jan Wieck <janwieck@Yahoo.com>)
List pgsql-general
Hi,
why I can't use tabb variable in INSERT ?
The error message I get is:
ERROR:  parser: parse error at or near "$1"

   DECLARE
      ids1              INTEGER;            ids2  INTEGER;
                tab         TEXT;                tabb        TEXT;
...
      tab := TG_RELNAME;
      tabb :=tab || ''_do_zablokowania'';
...
      if (NEW.stan=ids1) then
         INSERT INTO tabb (zlecenie) VALUES ( OLD.id);
--line that casues the trouble
      end if;
...
tia

Marcin Mazurek

--
Kierownik Działu Systemowego
MULTINET SA o/Poznan
http://www.multinet.pl/

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: AW: [HACKERS] My new job
Next
From: Jim Mercer
Date:
Subject: Re: 7.1 Release Date