mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed an issue in SQL generation for PostgreSQL-14 functions. Fixes #7081
This commit is contained in:
parent
19016c3733
commit
44ab4648a8
@ -24,4 +24,5 @@ Bug fixes
|
|||||||
| `Issue #7075 <https://redmine.postgresql.org/issues/7075>`_ - Ensure that help should be visible properly for Procedures.
|
| `Issue #7075 <https://redmine.postgresql.org/issues/7075>`_ - Ensure that help should be visible properly for Procedures.
|
||||||
| `Issue #7077 <https://redmine.postgresql.org/issues/7077>`_ - Fixed an issue where the Owner is not displayed in the reverse engineering SQL for Procedures.
|
| `Issue #7077 <https://redmine.postgresql.org/issues/7077>`_ - Fixed an issue where the Owner is not displayed in the reverse engineering SQL for Procedures.
|
||||||
| `Issue #7078 <https://redmine.postgresql.org/issues/7078>`_ - Fixed an issue where an operation error message pop up showing the database object's name incorrectly.
|
| `Issue #7078 <https://redmine.postgresql.org/issues/7078>`_ - Fixed an issue where an operation error message pop up showing the database object's name incorrectly.
|
||||||
|
| `Issue #7081 <https://redmine.postgresql.org/issues/7081>`_ - Fixed an issue in SQL generation for PostgreSQL-14 functions.
|
||||||
| `Issue #7096 <https://redmine.postgresql.org/issues/7096>`_ - Ensure that Truncate and Reset statistics should work.
|
| `Issue #7096 <https://redmine.postgresql.org/issues/7096>`_ - Ensure that Truncate and Reset statistics should work.
|
||||||
|
@ -1455,7 +1455,7 @@ class FunctionView(PGChildNodeView, DataTypeReader, SchemaDiffObjectCompare):
|
|||||||
else:
|
else:
|
||||||
FunctionView._merge_variables(data)
|
FunctionView._merge_variables(data)
|
||||||
|
|
||||||
self._format_prosrc_for_pure_sql(data, False)
|
self._format_prosrc_for_pure_sql(data, False, old_data['lanname'])
|
||||||
|
|
||||||
if allow_code_formatting:
|
if allow_code_formatting:
|
||||||
self.reformat_prosrc_code(data)
|
self.reformat_prosrc_code(data)
|
||||||
@ -1466,7 +1466,7 @@ class FunctionView(PGChildNodeView, DataTypeReader, SchemaDiffObjectCompare):
|
|||||||
)
|
)
|
||||||
return True, '', sql
|
return True, '', sql
|
||||||
|
|
||||||
def _format_prosrc_for_pure_sql(self, data, view_only=True):
|
def _format_prosrc_for_pure_sql(self, data, view_only=True, lanname='sql'):
|
||||||
|
|
||||||
if self.manager.sversion < 140000:
|
if self.manager.sversion < 140000:
|
||||||
return
|
return
|
||||||
@ -1483,7 +1483,7 @@ class FunctionView(PGChildNodeView, DataTypeReader, SchemaDiffObjectCompare):
|
|||||||
else:
|
else:
|
||||||
# when function/procedure definition is changed, we need to find
|
# when function/procedure definition is changed, we need to find
|
||||||
# whether definition is of pure or have std sql definition.
|
# whether definition is of pure or have std sql definition.
|
||||||
if self._is_function_def_sql_standard(data):
|
if lanname == 'sql' and self._is_function_def_sql_standard(data):
|
||||||
data['is_pure_sql'] = True
|
data['is_pure_sql'] = True
|
||||||
if data['prosrc'].endswith(';') is False:
|
if data['prosrc'].endswith(';') is False:
|
||||||
data['prosrc'] = ''.join((data['prosrc'], ';'))
|
data['prosrc'] = ''.join((data['prosrc'], ';'))
|
||||||
|
Loading…
Reference in New Issue
Block a user