Re: Question of using trigger's OLD in EXECUTE

Поиск
Список
Период
Сортировка
Искать
От
Nim Li
Тема
Re: Question of using trigger's OLD in EXECUTE
Дата
Msg-id
4AE1DDA1.5080302@sri.utoronto.ca
Ответ на
Список
Дерево обсуждения
Incompatible library : Missing Magic Block <A.Bhattacharya@sungard.com>
Question of using trigger's OLD in EXECUTE Nim Li <nimli@sri.utoronto.ca>
Re: Question of using trigger's OLD in EXECUTE Sam Mason <sam@samason.me.uk>
Re: Question of using trigger's OLD in EXECUTE Nim Li <nimli@sri.utoronto.ca>
Re: Incompatible library : Missing Magic Block "Massa, Harald Armin" <chef@ghum.de>
Re: Incompatible library : Missing Magic Block Craig Ringer <craig@postnewspapers.com.au>
Re: Incompatible library : Missing Magic Block Merlin Moncure <mmoncure@gmail.com>
Thank you Sam!!
The code in the posting solves my issue.  :)

Nim

On 10/23/2009 12:07 PM, Sam Mason wrote:
> On Fri, Oct 23, 2009 at 11:27:11AM -0400, Nim Li wrote:
>> CREATE OR REPLACE FUNCTION cp_tbl() RETURNS TRIGGER AS $proc$
>>    BEGIN
>>       EXECUTE 'INSERT INTO ' ||
>>       TG_ARGV[0]             ||
>>       ' SELECT '             ||
>>       OLD;
>>       RETURN NEW;
>>    END;	
>> $proc$ LANGUAGE plpgsql;
>>
>> At run-time, it prompts an error:
> 
>> Does anyone have any idea how to fix it?
> 
> You need to quote your literals! :) The details are a bit fiddly, but
> the following thread covered similar things recently:
> 
>   http://archives.postgresql.org/pgsql-general/2009-09/msg01176.php
> 
В списке pgsql-general по дате отправления
От: Tom Lane
Дата:
От: Joshua Berry
Дата:
FAQ