Search Postgresql Archives

Re: Function that returns Boolean

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Its a typo..it should be "RETURNS BOOLEAN" and not "RETURN BOOLEAN"
-Sharmila

--- On Mon, 2/23/09, SHARMILA JOTHIRAJAH <sharmi_jo@xxxxxxxxx> wrote:

> From: SHARMILA JOTHIRAJAH <sharmi_jo@xxxxxxxxx>
> Subject: Function that returns Boolean
> To: "General postgres mailing list" <pgsql-general@xxxxxxxxxxxxxx>
> Date: Monday, February 23, 2009, 12:39 PM
> Hi,
> This is a simple function that returns a boolean ..
> 
> create or replace function check_value( newValue IN
> VARCHAR,
>                     oldValue IN VARCHAR ) RETURN BOOLEAN
> 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


      

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux