| From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
|---|---|
| To: | Joop van Bussel <jvbussel(at)natlab(dot)research(dot)philips(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Function won't compile |
| Date: | 2001-10-24 22:08:34 |
| Message-ID: | Pine.BSF.4.21.0110241503130.57905-100000@megazone23.bigpanda.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Wed, 24 Oct 2001, Joop van Bussel wrote:
> 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();
Is it possible that you've got CRLFs at the end of lines instead of just
plain LFs in the function?
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Aasmund Midttun Godal | 2001-10-24 22:38:28 | Re: Can not input large text data |
| Previous Message | Doug McNaught | 2001-10-24 22:07:03 | Re: database development |