From: | Adrian Klaver <aklaver(at)comcast(dot)net> |
---|---|
To: | sharmi jo <sharmi_jo(at)yahoo(dot)com> |
Cc: | General postgres mailing list <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Function that returns Boolean |
Date: | 2009-02-23 17:56:58 |
Message-ID: | 230068862.1353591235411818515.JavaMail.root@sz0030a.emeryville.ca.mail.comcast.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
----- "SHARMILA JOTHIRAJAH" <sharmi_jo(at)yahoo(dot)com> wrote:
> Hi,
> This is a simple function that returns a boolean ..
>
> create or replace function check_value( newValue IN VARCHAR,
> oldValue IN VARCHAR ) RETURN BOOLEAN
^^^^^^ RETURNS
> as
> '
> BEGIN
> IF ( newValue != oldValue)
> then return true;
> else
> return false;
> END IF;
> END;
> '
> LANGUAGE 'plpgsql'
>
> But I get this error...what is wrong with this ?
>
> [Error] Script lines: 1-13 -------------------------
> ERROR: syntax error at or near "RETURN"
> Line: 2
>
> Thanks
> Sharmila
>
>
Adrian Klaver
aklaver(at)comcast(dot)net
From | Date | Subject | |
---|---|---|---|
Next Message | Keaton Adams | 2009-02-23 18:09:29 | Product Roadmap question and request for recommendation |
Previous Message | Tom Lane | 2009-02-23 17:49:00 | Re: Function that returns Boolean |