Function won't compile - Mailing list pgsql-general

From Joop van Bussel
Subject Function won't compile
Date
Msg-id 3bd6c319$0$28889$4d4ebb8e@read-nat.news.nl.uu.net
Whole thread Raw
Responses Re: Function won't compile  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Re: Function won't compile  ("Dr. Evil" <drevil@sidereal.kz>)
Re: Function won't compile  ("Aasmund Midttun Godal" <postgresql@envisity.com>)
List pgsql-general
Hi,

Does anybody know why the function insert_case() won't compile. When I
INSERT a new record I always get the following error message :

NOTICE:  plpgsql: ERROR during compile of insert_case near line 1
"RROR:  parse error at or near "

Below is the function and trigger. ('Now' is surrounded with single quotes)

CREATE FUNCTION insert_case () RETURNS INTEGER AS '
  BEGIN
    NEW.date_created := ''now'';
  END;
' LANGUAGE 'SQL';

CREATE TRIGGER trg_insert_case BEFORE INSERT ON pfdcase FOR EACH ROW EXECUTE
PROCEDURE insert_case();


Thanks



pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: index files still growing
Next
From: Peter Pilsl
Date:
Subject: variables in functions ..