On Thu, 2004-12-16 at 11:09 -0500, Tom Lane wrote:
> 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?

I agree this is pretty harmless. I've applied the attached trivial patch
to HEAD.

-Neil

Index: doc/src/sgml/plpgsql.sgml
===================================================================
RCS file: /var/lib/cvs/pgsql/doc/src/sgml/plpgsql.sgml,v
retrieving revision 1.51
diff -c -r1.51 plpgsql.sgml
*** doc/src/sgml/plpgsql.sgml	13 Dec 2004 18:05:08 -0000	1.51
--- doc/src/sgml/plpgsql.sgml	17 Dec 2004 03:37:41 -0000
***************
*** 1475,1481 ****
  
      <para>
       <literal>IF</> statements let you execute commands based on
!      certain conditions.  <application>PL/pgSQL</> has four forms of
       <literal>IF</>:
      <itemizedlist>
       <listitem>
--- 1475,1481 ----
  
      <para>
       <literal>IF</> statements let you execute commands based on
!      certain conditions.  <application>PL/pgSQL</> has five forms of
       <literal>IF</>:
      <itemizedlist>
       <listitem>
***************
*** 1490,1495 ****
--- 1490,1498 ----
       <listitem>
        <para><literal>IF ... THEN ... ELSIF ... THEN ... ELSE</></>
       </listitem>
+      <listitem>
+       <para><literal>IF ... THEN ... ELSEIF ... THEN ... ELSE</></>
+      </listitem>
      </itemizedlist>
      </para>
  
***************
*** 1633,1638 ****
--- 1636,1648 ----
  </programlisting>
         </para>
       </sect3>
+ 
+      <sect3>
+       <title><literal>IF-THEN-ELSEIF-ELSE</></title>
+ 
+       <para>
+        <literal>ELSEIF</> is an alias for <literal>ELSIF</>.
+      </para>
     </sect2>
  
     <sect2 id="plpgsql-control-structures-loops">
Index: src/pl/plpgsql/src/scan.l
===================================================================
RCS file: /var/lib/cvs/pgsql/src/pl/plpgsql/src/scan.l,v
retrieving revision 1.37
diff -c -r1.37 scan.l
*** src/pl/plpgsql/src/scan.l	13 Sep 2004 01:45:32 -0000	1.37
--- src/pl/plpgsql/src/scan.l	17 Dec 2004 03:08:22 -0000
***************
*** 144,149 ****
--- 144,150 ----
  default			{ return K_DEFAULT;			}
  diagnostics		{ return K_DIAGNOSTICS;		}
  else			{ return K_ELSE;			}
+ elseif          { return K_ELSIF;           }
  elsif           { return K_ELSIF;           }
  end				{ return K_END;				}
  exception		{ return K_EXCEPTION;		}
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to