pgadmin-org / pgadmin4

pgAdmin is the most popular and feature rich Open Source administration and development platform for PostgreSQL, the most advanced Open Source database in the world.
https://www.pgadmin.org
Other
2.53k stars 656 forks source link

SqlEditor does not display COMMIT/ROLLBACK/UPDATE {Row Count} in Messages (RM #4529) #2814

Closed dpage closed 2 years ago

dpage commented 5 years ago

Issue migrated from Redmine: https://redmine.postgresql.org/issues/4529 Originally created by Girish Shenoy at 2019-07-29 04:25:26 UTC.

When we execute an UPDATE query, the messages used to show === UPDATE 1

Query returned successfully in 52 msec.

Now it shows only

Query returned successfully in 52 msec.

Effect: When insert/update/delete statements are fired, we need to search for query rows affected in Query History. This becomes very cumbersome when we are inside a transaction and doing multiple steps. We do not know if the intended number of rows were affected or not. Notifications sent from functions are also not displayed.

Resolution: This change is after commit#710d5206 in web/pgadmin/tools/sqleditor/init.py

We need to add the following code at line#524 (before we call transaction_status = conn.transaction_status() )

# Procedure/Function output may comes in the form of Notices from the
# database server, so we need to append those outputs with the
# original result.
if status == 'Success' and result is None:
    result = conn.status_message()
    if (result != 'SELECT 1' or result != 'SELECT 0') and \
       result is not None and additional_messages:
        result = additional_messages + result
dpage commented 5 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/4529#note-1 Originally created by Girish Shenoy at 2019-07-29 04:37:49 UTC.

Resolution (formatted): We need to add the following code at line#524 (before we call transaction_status = conn.transaction_status() )

    #Procedure/Function output may comes in the form of Notices from the
    #database server, so we need to append those outputs with the
    #original result.
    if status == 'Success' and result is None:
        result = conn.status_message()
        if (result != 'SELECT 1' or result != 'SELECT 0') and \
           result is not None and additional_messages:
            result = additional_messages + result
dpage commented 5 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/4529#note-2 Originally created by Aditya Toshniwal at 2019-07-29 05:28:11 UTC.

Redmine ticket header update:

Name Old Value New Value
Relationship (relates) changed RM #4525
dpage commented 5 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/4529#note-3 Originally created by Akshay Joshi at 2019-07-29 06:27:34 UTC.

Redmine ticket header update:

Name Old Value New Value
Sprint changed EDB Sprint 46
dpage commented 5 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/4529#note-4 Originally created by Akshay Joshi at 2019-07-30 05:20:13 UTC.

Redmine ticket header update:

Name Old Value New Value
Assigned To changed Yosry Mohammad
dpage commented 5 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/4529#note-5 Originally created by Akshay Joshi at 2019-07-30 05:20:26 UTC.

Redmine ticket header update:

Name Old Value New Value
Sprint changed EDB Sprint 46
dpage commented 5 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/4529#note-6 Originally created by Yosry Mohammad at 2019-07-31 03:41:41 UTC.

Redmine ticket header update:

Name Old Value New Value
Relationship (relates) changed RM #4537
dpage commented 5 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/4529#note-7 Originally created by Khushboo Vashi at 2019-08-01 05:07:35 UTC.

Patch submitted by Yosry.

https://www.postgresql.org/message-id/CAFSMqn9CU3jyO-EUzzNbaGgzO+x8xVj=9ZfeGrei=Cx_mtJwbw@mail.gmail.com

Redmine ticket header update:

Name Old Value New Value
Status changed New In Progress
Sprint changed EDB Sprint 46
dpage commented 5 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/4529#note-8 Originally created by Dave Page at 2019-08-01 13:14:36 UTC.

Redmine ticket header update:

Name Old Value New Value
Relationship (relates) changed RM #4525
dpage commented 5 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/4529#note-9 Originally created by Dave Page at 2019-08-01 13:15:12 UTC.

Redmine ticket header update:

Name Old Value New Value
Relationship (duplicates) changed RM #4525
dpage commented 5 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/4529#note-10 Originally created by Dave Page at 2019-08-01 13:15:35 UTC.

Rejecting - duplicate of #4525

Redmine ticket header update:

Name Old Value New Value
Status changed In Progress Rejected
dpage commented 2 years ago

Issue closed on Redmine.