Re: [HACKERS] SQL statements: begin and end - Mailing list pgsql-hackers

From Thomas Lockhart
Subject Re: [HACKERS] SQL statements: begin and end
Date
Msg-id 383AAFEA.29688B4F@alumni.caltech.edu
Whole thread Raw
In response to Re: [HACKERS] SQL statements: begin and end  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] SQL statements: begin and end
List pgsql-hackers
> I went looking in the SQL spec to confirm this, and was rather
> startled to discover that BEGIN is not SQL at all!

Right- me too! I glanced through the SQL98 docs I have (mostly from
'94) and there is no addition afaict. BEGIN/END *are* defined in SQL,
but only in the context of embedded SQL.

> > Bruce, please don't use "begin" and "end" in your book.
> Sure, it makes sense for the book to consistently use "BEGIN WORK"
> and "COMMIT WORK", which are probably the least likely to confuse
> novices.  But I think actually removing the other variants would be
> just an exercise in causing trouble.

WORK is an optional noise word in SQL92. BEGIN WORK is not defined at
all, but I agree with Tom that the extension is essential.

I'm pretty sure that Andrea's biggest objection was to the acceptance
and use of END, which has no connection in official SQL to transaction
completion but only to block delimiting for cursor loops. It is almost
certainly a holdover from PostQuel.

Any thoughts on whether AZ's suggestion for dropping END in this
context should be done for 7.0? We certainly could make an effort to
at least purge it from our examples in the docs...
                   - Thomas

-- 
Thomas Lockhart                lockhart@alumni.caltech.edu
South Pasadena, California


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] SQL statements: begin and end
Next
From: Thomas Lockhart
Date:
Subject: Re: Mandrake RPMs (was RPM build on Suse linux 6.2)