Re: Passing parameters to triggers
От
Stephan Szabo
Тема
Re: Passing parameters to triggers
Дата
Msg-id
20020320082809.D45997-100000@megazone23.bigpanda.com
Ответ на
Passing parameters to triggers (Hans-Jürgen Schönig)
Список
Дерево обсуждения
Passing parameters to triggers Hans-Jürgen Schönig <hs@cybertec.at>
Re: Passing parameters to triggers Stephan Szabo <sszabo@megazone23.bigpanda.com>
Re: Passing parameters to triggers Jan Wieck <janwieck@yahoo.com>
On Thu, 14 Mar 2002, [iso-8859-1] Hans-J�rgen Sch�nig wrote: > I have a severe problem when working with PL/pgSQL triggers. Somehow the > problem seems to be strange. Here is the code: > > CREATE OR REPLACE FUNCTION checkint () RETURNS opaque AS > ' > BEGIN > IF TG_OP = ''DELETE'' THEN > RAISE NOTICE ''% wert'', TG_ARGV[0]; > DELETE FROM TG_ARGV[0]; EXECUTE ''DELETE FROM '' || TG_ARGV[0]; will probably do what you want. You can't directly substitute variables for tables, columns etc but you can use execute to run a command string.
В списке pgsql-general по дате отправления