Re: Function won't compile

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
Cc: Joop van Bussel <jvbussel(at)natlab(dot)research(dot)philips(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Function won't compile
Date: 2001-10-24 23:50:26
Message-ID: 26864.1003967426@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-10-24 23:55:02 Re: Disable Transaction - plans ?
Previous Message Hiroshi Inoue 2001-10-24 23:47:28 Re: Writing BLOBS to pgsql via ODBC using VB