Re: Function won't compile - Mailing list pgsql-general

From Tom Lane
Subject Re: Function won't compile
Date
Msg-id 26864.1003967426@sss.pgh.pa.us
Whole thread Raw
In response to Re: Function won't compile  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-general
> On Wed, 24 Oct 2001, Joop van Bussel wrote:
>> CREATE FUNCTION insert_case () RETURNS INTEGER AS '
>> BEGIN
>> NEW.date_created := ''now'';
>> END;
>> ' LANGUAGE 'SQL';
     ^^^^^^^^^^^^^^

Looks like plpgsql, not sql, to me.  It's got some other problems too:
no RETURN statement, and it should be declared to return opaque not
integer (though I'm unsure if the system will enforce that).

            regards, tom lane

pgsql-general by date:

Previous
From: "Dr. Evil"
Date:
Subject: Re: Disable Transaction - plans ?
Next
From: Tom Lane
Date:
Subject: Re: Disable Transaction - plans ?