Re: plpgsql: Is ELSE IF supported or not?

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "Marko Kreen" <markokr(at)gmail(dot)com>
Cc: "Postgres Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: plpgsql: Is ELSE IF supported or not?
Date: 2008-06-26 11:14:05
Message-ID: 162867790806260414h566d25e6ua664413deffe155f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

hello

2008/6/26 Marko Kreen <markokr(at)gmail(dot)com>:
> Docs seems to say it is, but following function fails to compile:
>
> create function err_else() returns void as $$
> begin
> if 1 = 1 then
> else if 1 = 2 then
> end if;
> end;
> $$ language plpgsql;
>
> ERROR: syntax error at or near ";"
> LINE 6: end;

use elseif or elsif :)

Pavel

>
> Version 8.3.3.
>
> --
> marko
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marko Kreen 2008-06-26 11:29:21 Re: plpgsql: Is ELSE IF supported or not?
Previous Message Marko Kreen 2008-06-26 10:57:50 plpgsql: Is ELSE IF supported or not?