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.27k stars 611 forks source link

Preferences.json file has no effect if external database is used. #7618

Open pravesh-sharma opened 1 week ago

pravesh-sharma commented 1 week ago

Describe the bug Create a docker container with a preferences.json file mapped and use an external database for configuration the mapped file has no effect.

Expected behavior Preferences provided on the JSON file should have an effect after the container starts.

Error message

2024-06-19 14:54:46 ╭───────────────────── Traceback (most recent call last) ──────────────────────╮
2024-06-19 14:54:46 │ /venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1971 in         │
2024-06-19 14:54:46 │ _exec_single_context                                                         │
2024-06-19 14:54:46 │                                                                              │
2024-06-19 14:54:46 │   1968 │   │   │   │   │   │   │   evt_handled = True                        │
2024-06-19 14:54:46 │   1969 │   │   │   │   │   │   │   break                                     │
2024-06-19 14:54:46 │   1970 │   │   │   │   if not evt_handled:                                   │
2024-06-19 14:54:46 │ ❱ 1971 │   │   │   │   │   self.dialect.do_execute(                          │
2024-06-19 14:54:46 │   1972 │   │   │   │   │   │   cursor, str_statement, effective_parameters,  │
2024-06-19 14:54:46 │   1973 │   │   │   │   │   )                                                 │
2024-06-19 14:54:46 │   1974                                                                       │
2024-06-19 14:54:46 │                                                                              │
2024-06-19 14:54:46 │ /venv/lib/python3.11/site-packages/sqlalchemy/engine/default.py:919 in       │
2024-06-19 14:54:46 │ do_execute                                                                   │
2024-06-19 14:54:46 │                                                                              │
2024-06-19 14:54:46 │    916 │   │   cursor.executemany(statement, parameters)                     │
2024-06-19 14:54:46 │    917 │                                                                     │
2024-06-19 14:54:46 │    918 │   def do_execute(self, cursor, statement, parameters, context=None) │
2024-06-19 14:54:46 │ ❱  919 │   │   cursor.execute(statement, parameters)                         │
2024-06-19 14:54:46 │    920 │                                                                     │
2024-06-19 14:54:46 │    921 │   def do_execute_no_params(self, cursor, statement, context=None):  │
2024-06-19 14:54:46 │    922 │   │   cursor.execute(statement)                                     │
2024-06-19 14:54:46 │                                                                              │
2024-06-19 14:54:46 │ /venv/lib/python3.11/site-packages/psycopg/cursor.py:737 in execute          │
2024-06-19 14:54:46 │                                                                              │
2024-06-19 14:54:46 │   734 │   │   │   │   │   self._execute_gen(query, params, prepare=prepare,  │
2024-06-19 14:54:46 │   735 │   │   │   │   )                                                      │
2024-06-19 14:54:46 │   736 │   │   except e._NO_TRACEBACK as ex:                                  │
2024-06-19 14:54:46 │ ❱ 737 │   │   │   raise ex.with_traceback(None)                              │
2024-06-19 14:54:46 │   738 │   │   return self                                                    │
2024-06-19 14:54:46 │   739 │                                                                      │
2024-06-19 14:54:46 │   740 │   def executemany(                                                   │
2024-06-19 14:54:46 ╰──────────────────────────────────────────────────────────────────────────────╯
2024-06-19 14:54:46 UndefinedFunction: operator does not exist: integer = character varying
2024-06-19 14:54:46 LINE 3: WHERE user_preferences.pid = $1::VARCHAR AND user_preference...
2024-06-19 14:54:46                                    ^
2024-06-19 14:54:46 HINT:  No operator matches the given name and argument types. You might need to 
2024-06-19 14:54:46 add explicit type casts.

Desktop (please complete the following information):