From 1316a3d7d89b43da805b1e8f2798c4125a1c45fb Mon Sep 17 00:00:00 2001 From: Akshay Joshi Date: Mon, 4 Aug 2025 12:02:30 +0530 Subject: [PATCH] Added all new connection string parameters introduced in PostgreSQL 16 and later. #8935 --- docs/en_US/release_notes_9_7.rst | 2 + .../servers/static/js/server.ui.js | 47 ++++++++++++++++++- .../servers/static/js/variable.ui.js | 8 ++++ web/regression/javascript/fake_pgadmin.js | 1 + 4 files changed, 57 insertions(+), 1 deletion(-) diff --git a/docs/en_US/release_notes_9_7.rst b/docs/en_US/release_notes_9_7.rst index 50559342d..fae6b4172 100644 --- a/docs/en_US/release_notes_9_7.rst +++ b/docs/en_US/release_notes_9_7.rst @@ -23,6 +23,7 @@ New features | `Issue #5766 `_ - Add support for automatic updates in the pgAdmin 4 Desktop application on macOS. | `Issue #6456 `_ - Added GENERIC_PLAN, MEMORY, SERIALIZE option to EXPLAIN/EXPLAIN ANALYZE command. | `Issue #8917 `_ - Add support for server tag-based filtering in the Object Explorer. + | `Issue #8935 `_ - Added all new connection string parameters introduced in PostgreSQL 16 and later. Housekeeping ************ @@ -36,6 +37,7 @@ Bug fixes | `Issue #8149 `_ - Fixed an issue where pgAdmin failed to update the server connection status when the server was disconnected in the background and a refresh was performed on that server. | `Issue #8650 `_ - Make Dashboard tables to be vertically resizable. | `Issue #8756 `_ - Fixed an issue in Firefox where the query window would shift to the left after opening the history tab or selecting a column header in the results grid. + | `Issue #8864 `_ - Fixed an issue where CPU usage was very high on Windows when opening the psql tool. | `Issue #8867 `_ - Ensure DB restriction type is preserved while import and export server. | `Issue #8969 `_ - Fixed incorrect behaviour of the option deduplicate items after creating the index. | `Issue #8971 `_ - Added PKEY index in the index statistics summary. diff --git a/web/pgadmin/browser/server_groups/servers/static/js/server.ui.js b/web/pgadmin/browser/server_groups/servers/static/js/server.ui.js index 80b7abdd1..d192c8037 100644 --- a/web/pgadmin/browser/server_groups/servers/static/js/server.ui.js +++ b/web/pgadmin/browser/server_groups/servers/static/js/server.ui.js @@ -48,7 +48,7 @@ class TagsSchema extends BaseUISchema { } export function getConnectionParameters() { - return [{ + let conParams = [{ 'value': 'hostaddr', 'label': gettext('Host address'), 'vartype': 'string' }, { 'value': 'passfile', 'label': gettext('Password file'), 'vartype': 'file' @@ -136,7 +136,52 @@ export function getConnectionParameters() { 'value': 'load_balance_hosts', 'label': gettext('Load balance hosts'), 'vartype': 'enum', 'min_server_version': '16', 'enumvals': [gettext('disable'), gettext('random')] + }, { + 'value': 'gssdelegation', 'label': gettext('GSS delegation?'), 'vartype': 'bool', + 'min_server_version': '16' + }, { + 'value': 'require_auth', 'label': gettext('Require authentication'), 'vartype': 'string', + 'min_server_version': '16' + }, { + 'value': 'sslnegotiation', 'label': gettext('SSL negotiation'), + 'vartype': 'enum', 'enumvals': [gettext('postgres'), gettext('direct')], + 'min_server_version': '17' + }, { + 'value': 'sslkeylogfile', 'label': gettext('SSL Key Logfile'), 'vartype': 'file', + 'min_server_version': '18' + }, { + 'value': 'min_protocol_version', 'label': gettext('Min protocol version'), + 'vartype': 'enum', 'min_server_version': '18', + 'enumvals': [gettext('3.0'), gettext('3.2'), gettext('latest')] + }, { + 'value': 'max_protocol_version', 'label': gettext('Max protocol version'), + 'vartype': 'enum', 'min_server_version': '18', + 'enumvals': [gettext('3.0'), gettext('3.2'), gettext('latest')] + }, { + 'value': 'scram_client_key', 'label': gettext('Scram client key'), 'vartype': 'string', + 'min_server_version': '18' + }, { + 'value': 'scram_server_key', 'label': gettext('Scram server key'), 'vartype': 'string', + 'min_server_version': '18' + }, { + 'value': 'oauth_issuer', 'label': gettext('OAuth issuer'), 'vartype': 'string', + 'min_server_version': '18' + }, { + 'value': 'oauth_client_id', 'label': gettext('OAuth client id'), 'vartype': 'string', + 'min_server_version': '18' + }, { + 'value': 'oauth_client_secret', 'label': gettext('OAuth client secret'), 'vartype': 'password', + 'min_server_version': '18' + }, { + 'value': 'oauth_scope', 'label': gettext('OAuth scope'), 'vartype': 'string', + 'min_server_version': '18' }]; + + conParams.sort(function (a, b) { + return pgAdmin.natural_sort(a.value, b.value); + }); + + return conParams; }; export default class ServerSchema extends BaseUISchema { diff --git a/web/pgadmin/browser/server_groups/servers/static/js/variable.ui.js b/web/pgadmin/browser/server_groups/servers/static/js/variable.ui.js index 0ef1acdbe..af77bb5d7 100644 --- a/web/pgadmin/browser/server_groups/servers/static/js/variable.ui.js +++ b/web/pgadmin/browser/server_groups/servers/static/js/variable.ui.js @@ -141,6 +141,14 @@ export default class VariableSchema extends BaseUISchema { placeholder: this.getPlaceHolderMsg(variable) } }; + case 'password': + return { + cell: 'password', + controlProps: { + maxLength: null, + autoComplete: 'new-password' + } + }; default: return ''; } diff --git a/web/regression/javascript/fake_pgadmin.js b/web/regression/javascript/fake_pgadmin.js index cc0694299..5c292cb51 100644 --- a/web/regression/javascript/fake_pgadmin.js +++ b/web/regression/javascript/fake_pgadmin.js @@ -96,6 +96,7 @@ const Browser = { const fakePgAdmin = { Browser: Browser, + natural_sort: ()=>{ return 1;} }; export default fakePgAdmin;