You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When changing the SELECT query of a View, no rows are displayed and "Total rows 0 of x" is shown at the bottom.
To Reproduce
Steps to reproduce the behavior:
Create a simple View
Right Click on the View -> View/Edit Data -> All Rows
Change the query, e. g. add a "WHERE 1 = 1" at the end
Expected behavior
Rows are shown
Error message
2024-04-17 00:00:17,593: ERROR pgadmin: 'ViewCommand' object has no attribute 'auto_commit'
Traceback (most recent call last):
File "/usr/pgadmin4/venv/lib64/python3.12/site-packages/flask/app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/pgadmin4/venv/lib64/python3.12/site-packages/flask/app.py", line 1469, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/pgadmin4/venv/lib64/python3.12/site-packages/flask_login/utils.py", line 290, in decorated_view
return current_app.ensure_sync(func)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/pgadmin4/web/pgadmin/tools/sqleditor/init.py", line 887, in start_query_tool
return StartRunningQuery(blueprint, current_app.logger).execute(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/pgadmin4/web/pgadmin/tools/sqleditor/utils/start_running_query.py", line 93, in execute
self.__execute_query(
File "/usr/pgadmin4/web/pgadmin/tools/sqleditor/utils/start_running_query.py", line 140, in __execute_query
if StartRunningQuery.is_begin_required_for_sql_query(trans_obj,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/pgadmin4/web/pgadmin/tools/sqleditor/utils/start_running_query.py", line 177, in is_begin_required_for_sql_query
return (not trans_obj.auto_commit and
^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ViewCommand' object has no attribute 'auto_commit'
Screenshots
Original query:
After changing the query:
Desktop (please complete the following information):
OS: Fedora 39
Version: 8.5
Mode: Desktop
Package type: RPM
The text was updated successfully, but these errors were encountered:
I got the same error while executing a request for creating a table from a select query. Example: create table foo as select * from bar; .
But this error appears only when the request is executed from a View/Edit Data tab converted to a Query Tool tab.
When executed directly in a Query Tool tab everything works as expected.
Describe the bug
When changing the SELECT query of a View, no rows are displayed and "Total rows 0 of x" is shown at the bottom.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Rows are shown
Error message
2024-04-17 00:00:17,593: ERROR pgadmin: 'ViewCommand' object has no attribute 'auto_commit'
Traceback (most recent call last):
File "/usr/pgadmin4/venv/lib64/python3.12/site-packages/flask/app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/pgadmin4/venv/lib64/python3.12/site-packages/flask/app.py", line 1469, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/pgadmin4/venv/lib64/python3.12/site-packages/flask_login/utils.py", line 290, in decorated_view
return current_app.ensure_sync(func)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/pgadmin4/web/pgadmin/tools/sqleditor/init.py", line 887, in start_query_tool
return StartRunningQuery(blueprint, current_app.logger).execute(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/pgadmin4/web/pgadmin/tools/sqleditor/utils/start_running_query.py", line 93, in execute
self.__execute_query(
File "/usr/pgadmin4/web/pgadmin/tools/sqleditor/utils/start_running_query.py", line 140, in __execute_query
if StartRunningQuery.is_begin_required_for_sql_query(trans_obj,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/pgadmin4/web/pgadmin/tools/sqleditor/utils/start_running_query.py", line 177, in is_begin_required_for_sql_query
return (not trans_obj.auto_commit and
^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ViewCommand' object has no attribute 'auto_commit'
Screenshots
Original query:
![grafik](https://private-user-images.githubusercontent.com/159784/323011858-dc2081d6-5e2d-4203-bcd6-52c3988a0740.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA1Mjg5NzMsIm5iZiI6MTcyMDUyODY3MywicGF0aCI6Ii8xNTk3ODQvMzIzMDExODU4LWRjMjA4MWQ2LTVlMmQtNDIwMy1iY2Q2LTUyYzM5ODhhMDc0MC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzA5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcwOVQxMjM3NTNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02MWVhZDM1MjA1OTNlMzMxMjdlMmUyNDA4OTM3MGUzYjQ2NDAzY2FiMjc2OWM5ODljY2U3NDA5YjkyZWRjNjFjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.qnX2fFeLz3m3od_lC09DwJZ3CHepyNC64bgAx-QumEc)
After changing the query:
![grafik](https://private-user-images.githubusercontent.com/159784/323011944-3557ae0e-458a-45ec-81dc-d3250d106fac.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA1Mjg5NzMsIm5iZiI6MTcyMDUyODY3MywicGF0aCI6Ii8xNTk3ODQvMzIzMDExOTQ0LTM1NTdhZTBlLTQ1OGEtNDVlYy04MWRjLWQzMjUwZDEwNmZhYy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzA5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcwOVQxMjM3NTNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lZWI0MDI4OWFkYWMzNTlhMGY0YzBiODZkMzUwYTEyNDZjYjkxYjMzNDM4NzRlYjM3YjU4ZDY0YmYxZjFjZDJhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.8gv9cI80Pi2SKZqJP77z2G67nDhoEgwnZQoh-cU7yb0)
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: