[FB-Tracker] Created: (CORE-5493) Add context variable about transaction start timestamp

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[FB-Tracker] Created: (CORE-5493) Add context variable about transaction start timestamp

JIRA tracker@firebirdsql.org
Add context variable about transaction start timestamp
------------------------------------------------------

                 Key: CORE-5493
                 URL: http://tracker.firebirdsql.org/browse/CORE-5493
             Project: Firebird Core
          Issue Type: New Feature
          Components: Engine
            Reporter: Karol Bieniaszewski


Please add to context variables transaction start timestamp
CURRENT_TRANSACTION_START_TIME

something like other context variables CURRENT_TRANSACTION, CURRENT_TIME
It is usefull for e.g. audit - to have whole transaction operations marked with same timestamp.

We can use Select from MON$ tables now, but it cause performance drop - also if included in TRANSACTION START trigger

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [FB-Tracker] Created: (CORE-5493) Add context variable about transaction start timestamp

Vlad Khorsun-2
01.03.2017 9:33, Karol Bieniaszewski (JIRA) wrote:

> Add context variable about transaction start timestamp
> ------------------------------------------------------
>
>                  Key: CORE-5493
>                  URL: http://tracker.firebirdsql.org/browse/CORE-5493
>              Project: Firebird Core
>           Issue Type: New Feature
>           Components: Engine
>             Reporter: Karol Bieniaszewski
>
>
> Please add to context variables transaction start timestamp
> CURRENT_TRANSACTION_START_TIME
>
> something like other context variables CURRENT_TRANSACTION, CURRENT_TIME
> It is usefull for e.g. audit - to have whole transaction operations marked with same timestamp.
>
> We can use Select from MON$ tables now, but it cause performance drop - also if included in TRANSACTION START trigger

   Is there any objection to add it into upcoming v3.0.2 and v4 ?

As for the name, i prefer CURRENT_TRANSACTION_TIME or CURRENT_TRANSACTION_TIMESTAMP.
Comments ?

Regards,
Vlad


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [FB-Tracker] Created: (CORE-5493) Add context variable about transaction start timestamp

Dimitry Sibiryakov-3
01.03.2017 17:24, Vlad Khorsun wrote:
>    Is there any objection to add it into upcoming v3.0.2 and v4 ?

   3.0 is supposed to be a feature-stable branch.


--
   WBR, SD.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [FB-Tracker] Created: (CORE-5493) Add context variable about transaction start timestamp

Dimitry Sibiryakov-3
In reply to this post by Vlad Khorsun-2
01.03.2017 17:24, Vlad Khorsun wrote:
> As for the name, i prefer CURRENT_TRANSACTION_TIME or CURRENT_TRANSACTION_TIMESTAMP.

   If this variable is added as a context variable into "SYSTEM" namespace, simple
"START_TIMESTAMP" should be enough, as none of transaction-related variables there have
"CURRENT_TRANSACTION" prefix.


--
   WBR, SD.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [FB-Tracker] Created: (CORE-5493) Add context variable about transaction start timestamp

Dmitry Yemanov-3
01.03.2017 19:33, Dimitry Sibiryakov wrote:

> If this variable is added as a context variable into "SYSTEM" namespace, simple
> "START_TIMESTAMP" should be enough

It could be confused with attachment-start timestamp.


Dmitry



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [FB-Tracker] Created: (CORE-5493) Add context variable about transaction start timestamp

Vlad Khorsun-2
01.03.2017 18:38, Dmitry Yemanov wrote:
> 01.03.2017 19:33, Dimitry Sibiryakov wrote:
>
>> If this variable is added as a context variable into "SYSTEM" namespace, simple
>> "START_TIMESTAMP" should be enough
>
> It could be confused with attachment-start timestamp.

   I thought it is clear that ticket is about new system contex variable (like
CURRENT_TRANSACTION), not about new variable for the RDB$GET_CONTEX().

   Also, I prefer to avoid to return as a string something that is not a string.

Regards,
Vlad


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [FB-Tracker] Created: (CORE-5493) Add context variable about transaction start timestamp

Dimitry Sibiryakov-3
In reply to this post by Dmitry Yemanov-3
01.03.2017 17:38, Dmitry Yemanov wrote:
> It could be confused with attachment-start timestamp.

   Add both. ;-)


--
   WBR, SD.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [FB-Tracker] Created: (CORE-5493) Add context variable about transaction start timestamp

Dmitry Yemanov-3
In reply to this post by Vlad Khorsun-2
01.03.2017 19:50, Vlad Khorsun wrote:
>
>>> If this variable is added as a context variable into "SYSTEM" namespace, simple
>>> "START_TIMESTAMP" should be enough
>>
>> It could be confused with attachment-start timestamp.
>
> I thought it is clear that ticket is about new system contex variable (like
> CURRENT_TRANSACTION), not about new variable for the RDB$GET_CONTEX().

Well, I missed that, sorry. START_TIMESTAMP is a bad name for both
implementations though.

> Also, I prefer to avoid to return as a string something that is not a string.

Agreed here. From another side, I don't like polluting the global
namespace with non-standard but reserved keywords.


Dmitry


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [FB-Tracker] Created: (CORE-5493) Add context variable about transaction start timestamp

Vlad Khorsun-2
01.03.2017 19:22, Dmitry Yemanov wrote:
>> 01.03.2017 19:50, Vlad Khorsun wrote:
..
>> Also, I prefer to avoid to return as a string something that is not a string.
>
> Agreed here. From another side, I don't like polluting the global
> namespace with non-standard but reserved keywords.

   Same here. Therefore i offer such long names, to avoid possible clashes :)
So, what will be our decision ?

Regards,
Vlad


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [FB-Tracker] Created: (CORE-5493) Add context variable about transaction start timestamp

Alex Peshkoff
On 03/01/17 20:51, Vlad Khorsun wrote:
> 01.03.2017 19:22, Dmitry Yemanov wrote:
>>> 01.03.2017 19:50, Vlad Khorsun wrote:
> ..
>>> Also, I prefer to avoid to return as a string something that is not a string.
>> Agreed here. From another side, I don't like polluting the global
>> namespace with non-standard but reserved keywords.
>     Same here. Therefore i offer such long names, to avoid possible clashes :)
> So, what will be our decision ?

Vlad, what happens if user already had variable
CURRENT_TRANSACTION_TIMESTAMP in his code?
I ask cause this name has (as far as I can see in SQL 2008) nothing to
do with SQL standard and someone might easily call his variable this way,



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [FB-Tracker] Created: (CORE-5493) Add context variable about transaction start timestamp

Vlad Khorsun-2
03.03.2017 13:15, Alex Peshkoff wrote:

> On 03/01/17 20:51, Vlad Khorsun wrote:
>> 01.03.2017 19:22, Dmitry Yemanov wrote:
>>>> 01.03.2017 19:50, Vlad Khorsun wrote:
>> ..
>>>> Also, I prefer to avoid to return as a string something that is not a string.
>>> Agreed here. From another side, I don't like polluting the global
>>> namespace with non-standard but reserved keywords.
>>     Same here. Therefore i offer such long names, to avoid possible clashes :)
>> So, what will be our decision ?
>
> Vlad, what happens if user already had variable
> CURRENT_TRANSACTION_TIMESTAMP in his code?

   It is obvious - (s)he should rename such variable.

> I ask cause this name has (as far as I can see in SQL 2008) nothing to
> do with SQL standard and someone might easily call his variable this way,

   Should we never add new non-standard system functions because of this ?

Regards,
Vlad


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [FB-Tracker] Created: (CORE-5493) Add context variable about transaction start timestamp

Dimitry Sibiryakov-3
03.03.2017 12:48, Vlad Khorsun wrote:
>    Should we never add new non-standard system functions because of this ?

   May be you should give them RDB$ prefix.


--
   WBR, SD.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [FB-Tracker] Created: (CORE-5493) Add context variable about transaction start timestamp

Alex Peshkoff
In reply to this post by Vlad Khorsun-2
On 03/03/17 14:48, Vlad Khorsun wrote:

> 03.03.2017 13:15, Alex Peshkoff wrote:
>> On 03/01/17 20:51, Vlad Khorsun wrote:
>>> 01.03.2017 19:22, Dmitry Yemanov wrote:
>>>>> 01.03.2017 19:50, Vlad Khorsun wrote:
>>> ..
>>>>> Also, I prefer to avoid to return as a string something that is not a string.
>>>> Agreed here. From another side, I don't like polluting the global
>>>> namespace with non-standard but reserved keywords.
>>>      Same here. Therefore i offer such long names, to avoid possible clashes :)
>>> So, what will be our decision ?
>> Vlad, what happens if user already had variable
>> CURRENT_TRANSACTION_TIMESTAMP in his code?
>     It is obvious - (s)he should rename such variable.
>
>> I ask cause this name has (as far as I can see in SQL 2008) nothing to
>> do with SQL standard and someone might easily call his variable this way,
>     Should we never add new non-standard system functions because of this ?

May be I was not enough precise - that's not big problem for major
release (FB4), but not good for 3.0.2.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [FB-Tracker] Created: (CORE-5493) Add context variable about transaction start timestamp

Vlad Khorsun-2
03.03.2017 13:53, Alex Peshkoff wrote:

> May be I was not enough precise - that's not big problem for major
> release (FB4), but not good for 3.0.2.

   While i not agree re. "problem" for 3.0.2, i'm not going to insist.

Regards,
Vlad


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Loading...