Re: pl/pgsql oddity

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Clodoaldo Pinto <clodoaldo_pinto(at)yahoo(dot)com(dot)br>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: pl/pgsql oddity
Date: 2004-12-16 20:25:22
Message-ID: 20041216202522.GD23397@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Dec 16, 2004 at 05:14:42PM -0300, Clodoaldo Pinto wrote:
> --- Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> escreveu:
> > Neil Conway <neilc(at)samurai(dot)com> writes:
> > > Tom also suggested just adding 'elseif' as an alternative for 'elsif'.
> > > That sounds like it would be worth doing.
> >
> > I think we should go ahead and do that for 8.0. I'm getting tired of
> > reading reports that stem from this mistake (I think this is the third
> > one in the past month ...). I can't see any real downside to accepting
> > both spellings, can you?
> >
> > regards, tom lane
>
> I made the exact same mistake and it took me a good chunk of energy to figure
> it out. I didn't report it to the list. When one look at the manual it is very
> easy to read elseif in instead of elsif.

I'd vote for one of two options:

1. Accept both elseif and elsif as equivalent or
2. Add some parsing magic to give a meaningful error message so people
see it immediatly.

Maybe just match in "elseif" at beginning of a line and error out with
"maybe you meant elsif".
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard_D_Levine 2004-12-16 20:34:03 Re: pl/pgsql oddity
Previous Message Clodoaldo Pinto 2004-12-16 20:14:42 Re: pl/pgsql oddity