Thread: autocommit feature in pgadmin
Hi,
Below is the description of the autocommit feature implementation in pgadmin:
This feature is only applicable in query editor.
Autocommit can be set on/off from 2 places.
1. pgadmin main browser -> File menu -> Options -> Query tool -> Query editor -> Enable Auto commit
2. In Query editor -> Query menu -> Auto-commmit
By default auto commit will be enabled in pgadmin.
In any query editor session, once user uncheck this autocommit checkbox, depending upon postgreSQL standard for executing the query it will execute "BEGIN;" statement before executing the actual query and thus setting the autocommit off for that session.
User can set the autocommit on at any time by selecting the checkbox from above mentioned places.
But it will be active only after user has completed the transaction block(started by BEGIN as mentioned above) by END or ROLLBACK or COMMIT;
Let me know in case of any queries.
Regards,
Sanket Mehta
Sr Software engineer
Enterprisedb
Hi Sanket,
In your patch, I see couple of issues with your patch:1. In pgadmin/frm/frmQuery.cpp:
i.e.
sysSettings::GetAutoCommit()
Please follow the correct naming convention for the frmQuery::CommandNoBegin(...) function.
Function must not start with a capital letter for a regular function (we do declare/define only the event functions with capital letters).
2. In pgadmin/ui/frmOptions.xrc:
A lot of changes are in this patch, which not required for this feature.
On Tue, Mar 24, 2015 at 6:01 PM, Sanket Mehta <sanket.mehta@enterprisedb.com> wrote:
Hi,Below is the description of the autocommit feature implementation in pgadmin:This feature is only applicable in query editor.Autocommit can be set on/off from 2 places.1. pgadmin main browser -> File menu -> Options -> Query tool -> Query editor -> Enable Auto commit2. In Query editor -> Query menu -> Auto-commmitBy default auto commit will be enabled in pgadmin.In any query editor session, once user uncheck this autocommit checkbox, depending upon postgreSQL standard for executing the query it will execute "BEGIN;" statement before executing the actual query and thus setting the autocommit off for that session.User can set the autocommit on at any time by selecting the checkbox from above mentioned places.But it will be active only after user has completed the transaction block(started by BEGIN as mentioned above) by END or ROLLBACK or COMMIT;Let me know in case of any queries.Regards,Sanket MehtaSr Software engineerEnterprisedb
Hi,
I have made all the changes mentioned in below mail.
Along with that I have changed the code to read autoRollBack value in pgadmin/frm/frmQuery.cpp file.
previously it was used "settings->Read(wxT("frmQuery/AutoRollBack"), &bVal, true)" directly.
Now I have changed it to settings->GetAutoRollBack() which is defined in sysSettings class.
I have attached the new patch with this mail.
Please review it and do the needful.
Regards,
Sanket Mehta
Sr Software engineer
Enterprisedb
On Tue, Mar 31, 2015 at 9:43 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:
and, sysSettings::SetAutoCommit()You should be using the function, you've defined in sysSettings.You've used "settings->Read(wxT("frmQuery/AutoCommit"), &bVal, true)" directly.Hi Sanket,In your patch, I see couple of issues with your patch:
1. In pgadmin/frm/frmQuery.cpp:
i.e.
sysSettings::GetAutoCommit()Please follow the correct naming convention for the frmQuery::CommandNoBegin(...) function.Function must not start with a capital letter for a regular function (we do declare/define only the event functions with capital letters).2. In pgadmin/ui/frmOptions.xrc:A lot of changes are in this patch, which not required for this feature.On Tue, Mar 24, 2015 at 6:01 PM, Sanket Mehta <sanket.mehta@enterprisedb.com> wrote:Hi,Below is the description of the autocommit feature implementation in pgadmin:This feature is only applicable in query editor.Autocommit can be set on/off from 2 places.1. pgadmin main browser -> File menu -> Options -> Query tool -> Query editor -> Enable Auto commit2. In Query editor -> Query menu -> Auto-commmitBy default auto commit will be enabled in pgadmin.In any query editor session, once user uncheck this autocommit checkbox, depending upon postgreSQL standard for executing the query it will execute "BEGIN;" statement before executing the actual query and thus setting the autocommit off for that session.User can set the autocommit on at any time by selecting the checkbox from above mentioned places.But it will be active only after user has completed the transaction block(started by BEGIN as mentioned above) by END or ROLLBACK or COMMIT;Let me know in case of any queries.Regards,Sanket MehtaSr Software engineerEnterprisedb
Attachment
On Wed, Apr 1, 2015 at 2:31 PM, Sanket Mehta <sanket.mehta@enterprisedb.com> wrote:
Hi,I have made all the changes mentioned in below mail.Along with that I have changed the code to read autoRollBack value in pgadmin/frm/frmQuery.cpp file.previously it was used "settings->Read(wxT("frmQuery/AutoRollBack"), &bVal, true)" directly.Now I have changed it to settings->GetAutoRollBack() which is defined in sysSettings class.I have attached the new patch with this mail.Please review it and do the needful.
Hi Sanket,
I was just thinking a scenario:
Let's see a user has disabled AutoCommit off.
That means (as per your patch), BEGIN statement is appended/executed before running any other statement requested by the user (if required).
Now - after executing some statement the user has changed the AutoCommit to on.
But - it will be still in transaction unless user executes the COMMIT/ROLLBACK/END, right?
Dave,
Do you think, we should give notice/message to the user that he/she needs to execute either of the above in order to enable the AUTOCOMMIT on in effect?
Regards,Sanket MehtaSr Software engineerEnterprisedbOn Tue, Mar 31, 2015 at 9:43 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:and, sysSettings::SetAutoCommit()You should be using the function, you've defined in sysSettings.You've used "settings->Read(wxT("frmQuery/AutoCommit"), &bVal, true)" directly.Hi Sanket,In your patch, I see couple of issues with your patch:
1. In pgadmin/frm/frmQuery.cpp:
i.e.
sysSettings::GetAutoCommit()Please follow the correct naming convention for the frmQuery::CommandNoBegin(...) function.Function must not start with a capital letter for a regular function (we do declare/define only the event functions with capital letters).2. In pgadmin/ui/frmOptions.xrc:A lot of changes are in this patch, which not required for this feature.On Tue, Mar 24, 2015 at 6:01 PM, Sanket Mehta <sanket.mehta@enterprisedb.com> wrote:Hi,Below is the description of the autocommit feature implementation in pgadmin:This feature is only applicable in query editor.Autocommit can be set on/off from 2 places.1. pgadmin main browser -> File menu -> Options -> Query tool -> Query editor -> Enable Auto commit2. In Query editor -> Query menu -> Auto-commmitBy default auto commit will be enabled in pgadmin.In any query editor session, once user uncheck this autocommit checkbox, depending upon postgreSQL standard for executing the query it will execute "BEGIN;" statement before executing the actual query and thus setting the autocommit off for that session.User can set the autocommit on at any time by selecting the checkbox from above mentioned places.But it will be active only after user has completed the transaction block(started by BEGIN as mentioned above) by END or ROLLBACK or COMMIT;Let me know in case of any queries.Regards,Sanket MehtaSr Software engineerEnterprisedb
--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Hi Ashesh,
Yes you are right.
It will be still in transaction till user executes COMMIT/ROLLBACK/END.
Regards,
Sanket Mehta
Sr Software engineer
Enterprisedb
On Tue, Apr 7, 2015 at 11:02 AM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:
On Wed, Apr 1, 2015 at 2:31 PM, Sanket Mehta <sanket.mehta@enterprisedb.com> wrote:Hi,I have made all the changes mentioned in below mail.Along with that I have changed the code to read autoRollBack value in pgadmin/frm/frmQuery.cpp file.previously it was used "settings->Read(wxT("frmQuery/AutoRollBack"), &bVal, true)" directly.Now I have changed it to settings->GetAutoRollBack() which is defined in sysSettings class.I have attached the new patch with this mail.Please review it and do the needful.Hi Sanket,I was just thinking a scenario:Let's see a user has disabled AutoCommit off.That means (as per your patch), BEGIN statement is appended/executed before running any other statement requested by the user (if required).Now - after executing some statement the user has changed the AutoCommit to on.But - it will be still in transaction unless user executes the COMMIT/ROLLBACK/END, right?Dave,Do you think, we should give notice/message to the user that he/she needs to execute either of the above in order to enable the AUTOCOMMIT on in effect?--Regards,Sanket MehtaSr Software engineerEnterprisedbOn Tue, Mar 31, 2015 at 9:43 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:and, sysSettings::SetAutoCommit()You should be using the function, you've defined in sysSettings.You've used "settings->Read(wxT("frmQuery/AutoCommit"), &bVal, true)" directly.Hi Sanket,In your patch, I see couple of issues with your patch:
1. In pgadmin/frm/frmQuery.cpp:
i.e.
sysSettings::GetAutoCommit()Please follow the correct naming convention for the frmQuery::CommandNoBegin(...) function.Function must not start with a capital letter for a regular function (we do declare/define only the event functions with capital letters).2. In pgadmin/ui/frmOptions.xrc:A lot of changes are in this patch, which not required for this feature.On Tue, Mar 24, 2015 at 6:01 PM, Sanket Mehta <sanket.mehta@enterprisedb.com> wrote:Hi,Below is the description of the autocommit feature implementation in pgadmin:This feature is only applicable in query editor.Autocommit can be set on/off from 2 places.1. pgadmin main browser -> File menu -> Options -> Query tool -> Query editor -> Enable Auto commit2. In Query editor -> Query menu -> Auto-commmitBy default auto commit will be enabled in pgadmin.In any query editor session, once user uncheck this autocommit checkbox, depending upon postgreSQL standard for executing the query it will execute "BEGIN;" statement before executing the actual query and thus setting the autocommit off for that session.User can set the autocommit on at any time by selecting the checkbox from above mentioned places.But it will be active only after user has completed the transaction block(started by BEGIN as mentioned above) by END or ROLLBACK or COMMIT;Let me know in case of any queries.Regards,Sanket MehtaSr Software engineerEnterprisedb
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
On Tue, Apr 7, 2015 at 11:02 AM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:
On Wed, Apr 1, 2015 at 2:31 PM, Sanket Mehta <sanket.mehta@enterprisedb.com> wrote:Hi,I have made all the changes mentioned in below mail.Along with that I have changed the code to read autoRollBack value in pgadmin/frm/frmQuery.cpp file.previously it was used "settings->Read(wxT("frmQuery/AutoRollBack"), &bVal, true)" directly.Now I have changed it to settings->GetAutoRollBack() which is defined in sysSettings class.I have attached the new patch with this mail.Please review it and do the needful.Hi Sanket,I was just thinking a scenario:Let's see a user has disabled AutoCommit off.That means (as per your patch), BEGIN statement is appended/executed before running any other statement requested by the user (if required).Now - after executing some statement the user has changed the AutoCommit to on.But - it will be still in transaction unless user executes the COMMIT/ROLLBACK/END, right?Dave,Do you think, we should give notice/message to the user that he/she needs to execute either of the above in order to enable the AUTOCOMMIT on in effect?
Dave,
Can you please comment on this?
--Regards,Sanket MehtaSr Software engineerEnterprisedbOn Tue, Mar 31, 2015 at 9:43 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:and, sysSettings::SetAutoCommit()You should be using the function, you've defined in sysSettings.You've used "settings->Read(wxT("frmQuery/AutoCommit"), &bVal, true)" directly.Hi Sanket,In your patch, I see couple of issues with your patch:
1. In pgadmin/frm/frmQuery.cpp:
i.e.
sysSettings::GetAutoCommit()Please follow the correct naming convention for the frmQuery::CommandNoBegin(...) function.Function must not start with a capital letter for a regular function (we do declare/define only the event functions with capital letters).2. In pgadmin/ui/frmOptions.xrc:A lot of changes are in this patch, which not required for this feature.On Tue, Mar 24, 2015 at 6:01 PM, Sanket Mehta <sanket.mehta@enterprisedb.com> wrote:Hi,Below is the description of the autocommit feature implementation in pgadmin:This feature is only applicable in query editor.Autocommit can be set on/off from 2 places.1. pgadmin main browser -> File menu -> Options -> Query tool -> Query editor -> Enable Auto commit2. In Query editor -> Query menu -> Auto-commmitBy default auto commit will be enabled in pgadmin.In any query editor session, once user uncheck this autocommit checkbox, depending upon postgreSQL standard for executing the query it will execute "BEGIN;" statement before executing the actual query and thus setting the autocommit off for that session.User can set the autocommit on at any time by selecting the checkbox from above mentioned places.But it will be active only after user has completed the transaction block(started by BEGIN as mentioned above) by END or ROLLBACK or COMMIT;Let me know in case of any queries.Regards,Sanket MehtaSr Software engineerEnterprisedb
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
On Wed, Apr 22, 2015 at 8:40 AM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:
On Tue, Apr 7, 2015 at 11:02 AM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:On Wed, Apr 1, 2015 at 2:31 PM, Sanket Mehta <sanket.mehta@enterprisedb.com> wrote:Hi,I have made all the changes mentioned in below mail.Along with that I have changed the code to read autoRollBack value in pgadmin/frm/frmQuery.cpp file.previously it was used "settings->Read(wxT("frmQuery/AutoRollBack"), &bVal, true)" directly.Now I have changed it to settings->GetAutoRollBack() which is defined in sysSettings class.I have attached the new patch with this mail.Please review it and do the needful.Hi Sanket,I was just thinking a scenario:Let's see a user has disabled AutoCommit off.That means (as per your patch), BEGIN statement is appended/executed before running any other statement requested by the user (if required).Now - after executing some statement the user has changed the AutoCommit to on.But - it will be still in transaction unless user executes the COMMIT/ROLLBACK/END, right?Dave,Do you think, we should give notice/message to the user that he/she needs to execute either of the above in order to enable the AUTOCOMMIT on in effect?Dave,Can you please comment on this?
Right - the user needs to be warned that the config change won't affect the existing transaction.
--Regards,Sanket MehtaSr Software engineerEnterprisedbOn Tue, Mar 31, 2015 at 9:43 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:and, sysSettings::SetAutoCommit()You should be using the function, you've defined in sysSettings.You've used "settings->Read(wxT("frmQuery/AutoCommit"), &bVal, true)" directly.Hi Sanket,In your patch, I see couple of issues with your patch:
1. In pgadmin/frm/frmQuery.cpp:
i.e.
sysSettings::GetAutoCommit()Please follow the correct naming convention for the frmQuery::CommandNoBegin(...) function.Function must not start with a capital letter for a regular function (we do declare/define only the event functions with capital letters).2. In pgadmin/ui/frmOptions.xrc:A lot of changes are in this patch, which not required for this feature.On Tue, Mar 24, 2015 at 6:01 PM, Sanket Mehta <sanket.mehta@enterprisedb.com> wrote:Hi,Below is the description of the autocommit feature implementation in pgadmin:This feature is only applicable in query editor.Autocommit can be set on/off from 2 places.1. pgadmin main browser -> File menu -> Options -> Query tool -> Query editor -> Enable Auto commit2. In Query editor -> Query menu -> Auto-commmitBy default auto commit will be enabled in pgadmin.In any query editor session, once user uncheck this autocommit checkbox, depending upon postgreSQL standard for executing the query it will execute "BEGIN;" statement before executing the actual query and thus setting the autocommit off for that session.User can set the autocommit on at any time by selecting the checkbox from above mentioned places.But it will be active only after user has completed the transaction block(started by BEGIN as mentioned above) by END or ROLLBACK or COMMIT;Let me know in case of any queries.Regards,Sanket MehtaSr Software engineerEnterprisedb
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
On Wed, Apr 22, 2015 at 8:40 AM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:On Tue, Apr 7, 2015 at 11:02 AM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:On Wed, Apr 1, 2015 at 2:31 PM, Sanket Mehta <sanket.mehta@enterprisedb.com> wrote:Hi,I have made all the changes mentioned in below mail.Along with that I have changed the code to read autoRollBack value in pgadmin/frm/frmQuery.cpp file.previously it was used "settings->Read(wxT("frmQuery/AutoRollBack"), &bVal, true)" directly.Now I have changed it to settings->GetAutoRollBack() which is defined in sysSettings class.I have attached the new patch with this mail.Please review it and do the needful.Hi Sanket,I was just thinking a scenario:Let's see a user has disabled AutoCommit off.That means (as per your patch), BEGIN statement is appended/executed before running any other statement requested by the user (if required).Now - after executing some statement the user has changed the AutoCommit to on.But - it will be still in transaction unless user executes the COMMIT/ROLLBACK/END, right?Dave,Do you think, we should give notice/message to the user that he/she needs to execute either of the above in order to enable the AUTOCOMMIT on in effect?Dave,Can you please comment on this?Right - the user needs to be warned that the config change won't affect the existing transaction.
Sanket,
Can you please do the required changes?
--Regards,Sanket MehtaSr Software engineerEnterprisedbOn Tue, Mar 31, 2015 at 9:43 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:and, sysSettings::SetAutoCommit()You should be using the function, you've defined in sysSettings.You've used "settings->Read(wxT("frmQuery/AutoCommit"), &bVal, true)" directly.Hi Sanket,In your patch, I see couple of issues with your patch:
1. In pgadmin/frm/frmQuery.cpp:
i.e.
sysSettings::GetAutoCommit()Please follow the correct naming convention for the frmQuery::CommandNoBegin(...) function.Function must not start with a capital letter for a regular function (we do declare/define only the event functions with capital letters).2. In pgadmin/ui/frmOptions.xrc:A lot of changes are in this patch, which not required for this feature.On Tue, Mar 24, 2015 at 6:01 PM, Sanket Mehta <sanket.mehta@enterprisedb.com> wrote:Hi,Below is the description of the autocommit feature implementation in pgadmin:This feature is only applicable in query editor.Autocommit can be set on/off from 2 places.1. pgadmin main browser -> File menu -> Options -> Query tool -> Query editor -> Enable Auto commit2. In Query editor -> Query menu -> Auto-commmitBy default auto commit will be enabled in pgadmin.In any query editor session, once user uncheck this autocommit checkbox, depending upon postgreSQL standard for executing the query it will execute "BEGIN;" statement before executing the actual query and thus setting the autocommit off for that session.User can set the autocommit on at any time by selecting the checkbox from above mentioned places.But it will be active only after user has completed the transaction block(started by BEGIN as mentioned above) by END or ROLLBACK or COMMIT;Let me know in case of any queries.Regards,Sanket MehtaSr Software engineerEnterprisedb
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers--Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Hi,
Sure, I will do the required changes.
Regards,
Sanket Mehta
Sr Software engineer
Enterprisedb
On Wed, Apr 22, 2015 at 3:09 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:
On Wed, Apr 22, 2015 at 8:40 AM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:On Tue, Apr 7, 2015 at 11:02 AM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:On Wed, Apr 1, 2015 at 2:31 PM, Sanket Mehta <sanket.mehta@enterprisedb.com> wrote:Hi,I have made all the changes mentioned in below mail.Along with that I have changed the code to read autoRollBack value in pgadmin/frm/frmQuery.cpp file.previously it was used "settings->Read(wxT("frmQuery/AutoRollBack"), &bVal, true)" directly.Now I have changed it to settings->GetAutoRollBack() which is defined in sysSettings class.I have attached the new patch with this mail.Please review it and do the needful.Hi Sanket,I was just thinking a scenario:Let's see a user has disabled AutoCommit off.That means (as per your patch), BEGIN statement is appended/executed before running any other statement requested by the user (if required).Now - after executing some statement the user has changed the AutoCommit to on.But - it will be still in transaction unless user executes the COMMIT/ROLLBACK/END, right?Dave,Do you think, we should give notice/message to the user that he/she needs to execute either of the above in order to enable the AUTOCOMMIT on in effect?Dave,Can you please comment on this?Right - the user needs to be warned that the config change won't affect the existing transaction.Sanket,Can you please do the required changes?--Regards,Sanket MehtaSr Software engineerEnterprisedbOn Tue, Mar 31, 2015 at 9:43 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:and, sysSettings::SetAutoCommit()You should be using the function, you've defined in sysSettings.You've used "settings->Read(wxT("frmQuery/AutoCommit"), &bVal, true)" directly.Hi Sanket,In your patch, I see couple of issues with your patch:
1. In pgadmin/frm/frmQuery.cpp:
i.e.
sysSettings::GetAutoCommit()Please follow the correct naming convention for the frmQuery::CommandNoBegin(...) function.Function must not start with a capital letter for a regular function (we do declare/define only the event functions with capital letters).2. In pgadmin/ui/frmOptions.xrc:A lot of changes are in this patch, which not required for this feature.On Tue, Mar 24, 2015 at 6:01 PM, Sanket Mehta <sanket.mehta@enterprisedb.com> wrote:Hi,Below is the description of the autocommit feature implementation in pgadmin:This feature is only applicable in query editor.Autocommit can be set on/off from 2 places.1. pgadmin main browser -> File menu -> Options -> Query tool -> Query editor -> Enable Auto commit2. In Query editor -> Query menu -> Auto-commmitBy default auto commit will be enabled in pgadmin.In any query editor session, once user uncheck this autocommit checkbox, depending upon postgreSQL standard for executing the query it will execute "BEGIN;" statement before executing the actual query and thus setting the autocommit off for that session.User can set the autocommit on at any time by selecting the checkbox from above mentioned places.But it will be active only after user has completed the transaction block(started by BEGIN as mentioned above) by END or ROLLBACK or COMMIT;Let me know in case of any queries.Regards,Sanket MehtaSr Software engineerEnterprisedb
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers--Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Hi,
I have made the following changes:
When autocommit mode is enabled and transaction is not idle, it will show a warning message to user suggesting to close the current transaction by executing COMMIT or ROLLBACK in order to take the effect of AUTOCOMMIT mode.
I have attached the patch with this mail.
Please review it.
Regards,
Sanket Mehta
Sr Software engineer
Enterprisedb
On Wed, Apr 22, 2015 at 3:25 PM, Sanket Mehta <sanket.mehta@enterprisedb.com> wrote:
Hi,Sure, I will do the required changes.Regards,Sanket MehtaSr Software engineerEnterprisedbOn Wed, Apr 22, 2015 at 3:09 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:On Wed, Apr 22, 2015 at 8:40 AM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:On Tue, Apr 7, 2015 at 11:02 AM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:On Wed, Apr 1, 2015 at 2:31 PM, Sanket Mehta <sanket.mehta@enterprisedb.com> wrote:Hi,I have made all the changes mentioned in below mail.Along with that I have changed the code to read autoRollBack value in pgadmin/frm/frmQuery.cpp file.previously it was used "settings->Read(wxT("frmQuery/AutoRollBack"), &bVal, true)" directly.Now I have changed it to settings->GetAutoRollBack() which is defined in sysSettings class.I have attached the new patch with this mail.Please review it and do the needful.Hi Sanket,I was just thinking a scenario:Let's see a user has disabled AutoCommit off.That means (as per your patch), BEGIN statement is appended/executed before running any other statement requested by the user (if required).Now - after executing some statement the user has changed the AutoCommit to on.But - it will be still in transaction unless user executes the COMMIT/ROLLBACK/END, right?Dave,Do you think, we should give notice/message to the user that he/she needs to execute either of the above in order to enable the AUTOCOMMIT on in effect?Dave,Can you please comment on this?Right - the user needs to be warned that the config change won't affect the existing transaction.Sanket,Can you please do the required changes?--Regards,Sanket MehtaSr Software engineerEnterprisedbOn Tue, Mar 31, 2015 at 9:43 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:and, sysSettings::SetAutoCommit()You should be using the function, you've defined in sysSettings.You've used "settings->Read(wxT("frmQuery/AutoCommit"), &bVal, true)" directly.Hi Sanket,In your patch, I see couple of issues with your patch:
1. In pgadmin/frm/frmQuery.cpp:
i.e.
sysSettings::GetAutoCommit()Please follow the correct naming convention for the frmQuery::CommandNoBegin(...) function.Function must not start with a capital letter for a regular function (we do declare/define only the event functions with capital letters).2. In pgadmin/ui/frmOptions.xrc:A lot of changes are in this patch, which not required for this feature.On Tue, Mar 24, 2015 at 6:01 PM, Sanket Mehta <sanket.mehta@enterprisedb.com> wrote:Hi,Below is the description of the autocommit feature implementation in pgadmin:This feature is only applicable in query editor.Autocommit can be set on/off from 2 places.1. pgadmin main browser -> File menu -> Options -> Query tool -> Query editor -> Enable Auto commit2. In Query editor -> Query menu -> Auto-commmitBy default auto commit will be enabled in pgadmin.In any query editor session, once user uncheck this autocommit checkbox, depending upon postgreSQL standard for executing the query it will execute "BEGIN;" statement before executing the actual query and thus setting the autocommit off for that session.User can set the autocommit on at any time by selecting the checkbox from above mentioned places.But it will be active only after user has completed the transaction block(started by BEGIN as mentioned above) by END or ROLLBACK or COMMIT;Let me know in case of any queries.Regards,Sanket MehtaSr Software engineerEnterprisedb
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers--Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachment
On Wed, Apr 22, 2015 at 6:49 PM, Sanket Mehta <sanket.mehta@enterprisedb.com> wrote:
Hi,I have made the following changes:When autocommit mode is enabled and transaction is not idle, it will show a warning message to user suggesting to close the current transaction by executing COMMIT or ROLLBACK in order to take the effect of AUTOCOMMIT mode.I have attached the patch with this mail.Please review it.
Looks better now.
Checked-in on master branch.
Regards,Sanket MehtaSr Software engineerEnterprisedbOn Wed, Apr 22, 2015 at 3:25 PM, Sanket Mehta <sanket.mehta@enterprisedb.com> wrote:Hi,Sure, I will do the required changes.Regards,Sanket MehtaSr Software engineerEnterprisedbOn Wed, Apr 22, 2015 at 3:09 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:On Wed, Apr 22, 2015 at 8:40 AM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:On Tue, Apr 7, 2015 at 11:02 AM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:On Wed, Apr 1, 2015 at 2:31 PM, Sanket Mehta <sanket.mehta@enterprisedb.com> wrote:Hi,I have made all the changes mentioned in below mail.Along with that I have changed the code to read autoRollBack value in pgadmin/frm/frmQuery.cpp file.previously it was used "settings->Read(wxT("frmQuery/AutoRollBack"), &bVal, true)" directly.Now I have changed it to settings->GetAutoRollBack() which is defined in sysSettings class.I have attached the new patch with this mail.Please review it and do the needful.Hi Sanket,I was just thinking a scenario:Let's see a user has disabled AutoCommit off.That means (as per your patch), BEGIN statement is appended/executed before running any other statement requested by the user (if required).Now - after executing some statement the user has changed the AutoCommit to on.But - it will be still in transaction unless user executes the COMMIT/ROLLBACK/END, right?Dave,Do you think, we should give notice/message to the user that he/she needs to execute either of the above in order to enable the AUTOCOMMIT on in effect?Dave,Can you please comment on this?Right - the user needs to be warned that the config change won't affect the existing transaction.Sanket,Can you please do the required changes?--Regards,Sanket MehtaSr Software engineerEnterprisedbOn Tue, Mar 31, 2015 at 9:43 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:and, sysSettings::SetAutoCommit()You should be using the function, you've defined in sysSettings.You've used "settings->Read(wxT("frmQuery/AutoCommit"), &bVal, true)" directly.Hi Sanket,In your patch, I see couple of issues with your patch:
1. In pgadmin/frm/frmQuery.cpp:
i.e.
sysSettings::GetAutoCommit()Please follow the correct naming convention for the frmQuery::CommandNoBegin(...) function.Function must not start with a capital letter for a regular function (we do declare/define only the event functions with capital letters).2. In pgadmin/ui/frmOptions.xrc:A lot of changes are in this patch, which not required for this feature.On Tue, Mar 24, 2015 at 6:01 PM, Sanket Mehta <sanket.mehta@enterprisedb.com> wrote:Hi,Below is the description of the autocommit feature implementation in pgadmin:This feature is only applicable in query editor.Autocommit can be set on/off from 2 places.1. pgadmin main browser -> File menu -> Options -> Query tool -> Query editor -> Enable Auto commit2. In Query editor -> Query menu -> Auto-commmitBy default auto commit will be enabled in pgadmin.In any query editor session, once user uncheck this autocommit checkbox, depending upon postgreSQL standard for executing the query it will execute "BEGIN;" statement before executing the actual query and thus setting the autocommit off for that session.User can set the autocommit on at any time by selecting the checkbox from above mentioned places.But it will be active only after user has completed the transaction block(started by BEGIN as mentioned above) by END or ROLLBACK or COMMIT;Let me know in case of any queries.Regards,Sanket MehtaSr Software engineerEnterprisedb
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers--Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company