Re: trigger help

From: marcelo Cortez <jmdc_marcelo(at)yahoo(dot)com(dot)ar>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: trigger help
Date: 2006-08-22 17:37:19
Message-ID: 20060822173719.24708.qmail@web32105.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Micheal

> This isn't a trigger function. Are you sure
> "trigger" is the
> word you meant?

yes i do

CREATE TABLE actlocat
(
id_actlocal numeric(2) NOT NULL,
d_actlocal char(8) NOT NULL,
f_novedad float8 NOT NULL,
ordenado_por char(18) NOT NULL,
CONSTRAINT pk_actlocat PRIMARY KEY (id_actlocal)
)
WITHOUT OIDS;
ALTER TABLE actlocat OWNER TO postgres;

CREATE TRIGGER sume_create_cache_actlocat_trigger
AFTER UPDATE
ON actlocat
FOR EACH ROW
EXECUTE PROCEDURE
xxxx_create_cache_actlocat_trigger_function();

.
.
.


CREATE OR REPLACE FUNCTION
xxxx_create_cache_actlocat_trigger_function()
RETURNS "trigger" AS
$BODY$
BEGIN
PERFORM
xxxx_create_cache(lower(NEW.d_actlocal)::text);
RAISE NOTICE
'xxxx_create_cache_actlocat_trigger_function(%)',
lower(NEW.d_actlocal)::text;
RETURN NULL;
END;
$BODY$
LANGUAGE 'plpgsql' VOLATILE;
ALTER FUNCTION s

best regards
MDC




__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message A. Kretschmer 2006-08-22 18:56:15 Re: unique constraint when updating tables
Previous Message Harpreet Dhaliwal 2006-08-22 17:18:44 Passing arguments to a trigger function