From: | Tiziano Slack <slack83(at)hotmail(dot)it> |
---|---|
To: | <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: TG_TABLE_NAME as identifier |
Date: | 2008-02-07 07:16:21 |
Message-ID: | BAY109-W22937ED37F3081CAEC9F26CE2E0@phx.gbl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Thanks for the precious tips, but unfortunately the syntax:
EXECUTE 'INSERT INTO '|| TG_TABLE_NAME ||' SELECT '|| NEW.*;is parsed correctly, but when the trigger is fired the following error is returned
ERROR: column "*" not found in data type mytable
CONTEXT: SQL statement "SELECT 'INSERT INTO '|| $1 ||' SELECT '|| $2 .*"
Using
EXECUTE 'INSERT INTO '|| TG_TABLE_NAME ||' SELECT NEW.*';
instead, returns:
ERROR: NEW used in query that is not in a rule
CONTEXT: SQL statement "INSERT INTO anag_referenti SELECT NEW.*"
Hope someone can show me another way to do that, if exists ;)
Have a nice day!
T.
_________________________________________________________________
Ti piace giocare con le lettere? Prova ABCLive!
http://messengergiochi.it.msn.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2008-02-07 07:52:22 | Re: TG_TABLE_NAME as identifier |
Previous Message | Steve Midgley | 2008-02-07 03:35:56 | Re: accounting schema |