Tiziano Slack wrote:
Hello everybody! I'm newbie to plpgsql syntax. Can anyone tell where
I'm getting wrong?

INSERT INTO TG_TABLE_NAME SELECT NEW.*;

If you need to build a dynamic query with plpgsql you'll need to assemble it as a string and use EXECUTE. You can use variables in comparisons etc. but not as column-names or table-names.

You might want to look at pltcl or plperl etc. if you are going to be doing a lot of this sort of stuff.

--
  Richard Huxton
  Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to