dbTalk Databases Forums  

[BUGS] semicolon not required on END statement

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] semicolon not required on END statement in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Hussein Patni
 
Posts: n/a

Default [BUGS] semicolon not required on END statement - 10-01-2004 , 08:36 AM






Hello,

I noticed in plpgsql that a semi colon is not always required after
the END statement. A contrived example:

CREATE sequence foo;
=A0
CREATE OR REPLACE FUNCTION bar() RETURNS VOID AS '
DECLARE
bar int;
BEGIN
SELECT INTO bar nextval(''foo'');
RETURN;
END
' LANGUAGE plpgsql;

--hussein

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Reply With Quote
  #2  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: [BUGS] semicolon not required on END statement - 10-01-2004 , 07:50 PM







Improved wording that doesn't telegraph, "Look at me!":

Each declaration and each statement within a block is terminated by a
semicolon, though the final <literal>END</literal> that concludes a
function does not require one.


---------------------------------------------------------------------------

Neil Conway wrote:
Quote:
On Fri, 2004-10-01 at 13:46, Tom Lane wrote:
We specifically do not require a semicolon at the very end of the
function definition.

Yeah, makes sense. Attached is a doc patch. Barring any objections I'll
apply it to HEAD by end-of-day today.

-Neil

[ Attachment, skipping... ]

Quote:
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly
--
Bruce Momjian | http://candle.pha.pa.us
pgman (AT) candle (DOT) pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster


Reply With Quote
  #3  
Old   
Neil Conway
 
Posts: n/a

Default Re: [BUGS] semicolon not required on END statement - 10-04-2004 , 12:43 AM



Bruce Momjian wrote:
Quote:
Improved wording that doesn't telegraph, "Look at me!":

Each declaration and each statement within a block is terminated by a
semicolon, though the final <literal>END</literal> that concludes a
function does not require one.
Patch applied.

-Neil

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo (AT) postgresql (DOT) org


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.