Re: [HACKERS] SQL statements: begin and end

Поиск
Список
Период
Сортировка
От Thomas Lockhart
Тема Re: [HACKERS] SQL statements: begin and end
Дата
Msg-id 383AAFEA.29688B4F@alumni.caltech.edu
обсуждение исходный текст
Ответ на Re: [HACKERS] SQL statements: begin and end  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] SQL statements: begin and end  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] SQL statements: begin and end
Следующее
От: Thomas Lockhart
Дата:
Сообщение: Re: Mandrake RPMs (was RPM build on Suse linux 6.2)