Re: TG_TABLE_NAME as identifier - Mailing list pgsql-sql

From Richard Huxton
Subject Re: TG_TABLE_NAME as identifier
Date
Msg-id 47A82D42.8070007@archonet.com
Whole thread Raw
In response to TG_TABLE_NAME as identifier  (Tiziano Slack <slack83@hotmail.it>)
List pgsql-sql
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


pgsql-sql by date:

Previous
From: Tiziano Slack
Date:
Subject: TG_TABLE_NAME as identifier
Next
From: "Robins Tharakan"
Date:
Subject: Re: TG_TABLE_NAME as identifier