Re: Function that returns Boolean - Mailing list pgsql-general

From Tom Lane
Subject Re: Function that returns Boolean
Date
Msg-id 15329.1235411340@sss.pgh.pa.us
Whole thread Raw
In response to Function that returns Boolean  (SHARMILA JOTHIRAJAH <sharmi_jo@yahoo.com>)
List pgsql-general
SHARMILA JOTHIRAJAH <sharmi_jo@yahoo.com> writes:
> create or replace function check_value( newValue IN VARCHAR,
>                     oldValue IN VARCHAR ) RETURN BOOLEAN

Should be RETURNS BOOLEAN.

You might want to fix whatever client code you are using so that it
shows the error cursor, which would certainly have helped direct
your attention to the right place instead of the wrong one.  What
I see in psql is

ERROR:  syntax error at or near "RETURN"
LINE 2:                     oldValue IN VARCHAR ) RETURN BOOLEAN
                                                  ^


            regards, tom lane

pgsql-general by date:

Previous
From: SHARMILA JOTHIRAJAH
Date:
Subject: Re: Function that returns Boolean
Next
From: Adrian Klaver
Date:
Subject: Re: Function that returns Boolean