Tigger - Mailing list pgsql-sql

From David Hofmann
Subject Tigger
Date
Msg-id BAY105-F13ED683B496DCE39673E6FBBC90@phx.gbl
Whole thread Raw
Responses Re: Tigger
List pgsql-sql
I've look throught the docs and from what I can see the bellow code should 
work, however I keep getting the error:

ERROR:  parser: parse error at or near "$" at character 53

CREATE FUNCTION session_update() RETURNS trigger AS $session_update$
BEGIN-- Check date existsIF NEW.stamp_lastupdate IS NULL THEN    NEW.stamp_lastupdate := 'now';END IF;RETURN NEW;
END;

$session_update$ LANGUAGE plpgsql;

CREATE TRIGGER session_update BEFORE INSERT OR UPDATE ON sessions FOR EACH 
ROW EXECUTE PROCEDURE session_update();


Any help or suggestions of websites I should read would be appercated.

David

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



pgsql-sql by date:

Previous
From: Tony Wasson
Date:
Subject: Re: Multi-column returns from pgsql
Next
From: Bricklen Anderson
Date:
Subject: Re: Tigger