On 18 November 2014 01:00, Jim Nasby <Jim.Nasby@bluetreble.com> wrote: > On 11/17/14, 4:58 PM, Simon Riggs wrote: >>>> >>>> Great, looks good to me, marking as ready for committer. >> >> >> What is wrong with using IF ? > > > It's a hell of a lot wordier. I've previously created a more sophisticated > "assert" framework to allow more control over things, but ended up also > using it just for simple sanity checking because it was much nicer than > typeing IF THEN RAISE ERROR END IF.
Why is that not a requirement for a less wordier form of IF?
IF (something) THEN action
statement IF is a control statement - and syntax, pattern for control statements in plpgsql is consistent. I don't want to break it (more, probably it is hardly implemented due problems in bison). PL/pgSQL, PL/SQL, Ada are well designed (in my opinion). Conditional statement has precedent in PL/pgSQL now. We support EXIT and CONTINUE WHEN, so we don't propose a new pattern, only reuse some existing.