Skip site navigation (1) Skip section navigation (2)

Re: Trigger and Trigger function.

From: John DeSoi <desoi(at)pgedit(dot)com>
To: Matt Iskra <Matt(dot)Iskra(at)doj(dot)ca(dot)gov>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Trigger and Trigger function.
Date: 2005-06-17 11:55:36
Message-ID: f05500b250bd5d026e53da62b41e6301@pgedit.com (view raw or flat)
Thread:
Lists: pgsql-novice
On Jun 16, 2005, at 6:56 PM, Matt Iskra wrote:

> CREATE FUNCTION
> oc.upd_last_touch()      <-- syntex error here
> RETURNS TRIGGER AS
> $upd_last_touch$
> BEGIN
> 	IF TG_NAME = 'optical_trig' THEN
> 		UPDATE optical
> 		SET NEW.last_touch = current_timestamp
> 		WHERE NEW.id = id;
> 	END IF;
> END;
> $upd_last_touch$
> LANGUAGE 'plpgsql' VOLATILE;


I don't think $upd_last_touch$ is a legal dollar quote. It needs to be 
alphanumeric characters only (no underscores).


John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


In response to

Responses

pgsql-novice by date

Next:From: Michael FuhrDate: 2005-06-17 12:59:04
Subject: Re: Trigger and Trigger function.
Previous:From: Morgan KitaDate: 2005-06-17 01:30:45
Subject: Basic query performance question

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group