Subject Re: [Firebird-Architect] Autonomous Transaction Routines
Author Adriano dos Santos Fernandes
Vlad Khorsun escreveu:
>> Alex Peshkov escreveu:
>>
>>> And may I suggest slightly other syntax. We never write
>>> BEGIN FOR SELECT ...
>>> END FOR SELECT
>>> May be for autonomous transaction a bit more traditionally-looking syntax can
>>> be used, i.e.:
>>> IN AUTONOMOUS TRANSACTION DO {complex_statement}
>>>
>> It's current defined this way. That seems more a PSQL-like command.
>>
>> We can change it if there is good arguments for. ;-)
>>
>
> I, personally, prefer
>
> BEGIN [AUTONOMOUS [<tran_options> TRANSACTION]]
> ...
> END
>
> where [<tran_options> TRANSACTION] may be implemented later
>
1) A common usage pattern of autonomous transaction will be to insert
one row in a table.
Current syntax allow it without BEGIN ... END.

2) Only BEGIN ... END as you suggested (AUTONOMOUS... optional) is a
current valid syntax for compound statement. :-)


Adriano