Function won't compile

From: "Joop van Bussel" <jvbussel(at)natlab(dot)research(dot)philips(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Function won't compile
Date: 2001-10-24 13:33:02
Message-ID: 3bd6c319$0$28889$4d4ebb8e@read-nat.news.nl.uu.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Lockhart 2001-10-24 13:35:41 Re: Disable Transaction - plans ?
Previous Message Henshall, Stuart - WCP 2001-10-24 12:40:23 Re: [GENERAL] Postgres 7.1.3. installation on Windows platfor