Skip site navigation (1) Skip section navigation (2)

plpgsql: Is ELSE IF supported or not?

From: "Marko Kreen" <markokr(at)gmail(dot)com>
To: "Postgres Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: plpgsql: Is ELSE IF supported or not?
Date: 2008-06-26 10:57:50
Message-ID: e51f66da0806260357s2be646cdg2aa491eceebe63d8@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
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;

Version 8.3.3.

-- 
marko

Responses

pgsql-hackers by date

Next:From: Pavel StehuleDate: 2008-06-26 11:14:05
Subject: Re: plpgsql: Is ELSE IF supported or not?
Previous:From: Simon RiggsDate: 2008-06-26 10:57:07
Subject: Join Removal/ Vertical Partitioning

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group