Re: Function that returns Boolean

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: 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:49:00
Message-ID: 15329.1235411340@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

SHARMILA JOTHIRAJAH <sharmi_jo(at)yahoo(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2009-02-23 17:56:58 Re: Function that returns Boolean
Previous Message SHARMILA JOTHIRAJAH 2009-02-23 17:43:23 Re: Function that returns Boolean