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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-novice by date

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