Обсуждение: BEGIN vs START TRANSACTION

Поиск
Список
Период
Сортировка

BEGIN vs START TRANSACTION

От
Gaetano Mendola
Дата:
Hi all,
why START TRANSACTION READ ONLY is allowed
and not BEGIN READ ONLY ?







Regards
Gaetano Mendola



Re: BEGIN vs START TRANSACTION

От
Bruce Momjian
Дата:
Gaetano Mendola wrote:
> Hi all,
> why START TRANSACTION READ ONLY is allowed
> and not BEGIN READ ONLY ?

I think because START TRANSACTION is SQL standard?   However, I thought
BEGIN WORK was SQL standard, and we don't support READ ONLY there
either --- hmmm.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


Re: BEGIN vs START TRANSACTION

От
Christopher Kings-Lynne
Дата:
> I think because START TRANSACTION is SQL standard?   However, I thought
> BEGIN WORK was SQL standard, and we don't support READ ONLY there
> either --- hmmm.

BEGIN is no part of the SQL standard.  The only way to begin a 
transaction under the SQL standard is START TRANSACTION.

Chris




Re: BEGIN vs START TRANSACTION

От
Neil Conway
Дата:
On Sun, 2003-10-26 at 19:22, Gaetano Mendola wrote:
> Hi all,
> why START TRANSACTION READ ONLY is allowed
> and not BEGIN READ ONLY ?

As Chris KL points out, it's not required by the standard (since BEGIN
isn't part of the standard to begin with). I suppose we could add it,
but it seems a little pointless -- "BEGIN ; SET ..." seems just as good.

-Neil




Re: BEGIN vs START TRANSACTION

От
Gaetano Mendola
Дата:
Christopher Kings-Lynne wrote:>> I think because START TRANSACTION is SQL standard?   However, I thought>> BEGIN WORK
wasSQL standard, and we don't support READ ONLY there>> either --- hmmm.>>> BEGIN is no part of the SQL standard.  The
onlyway to begin a> transaction under the SQL standard is START TRANSACTION.
 

These IMHO means push people to not use BEGIN anymore.


Regards
Gaetano Mendola