Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refs #33308 -- Modernized database wrapper in the PostgreSQL backend. #16362

Closed
wants to merge 1 commit into from

Conversation

felixxm
Copy link
Member

@felixxm felixxm commented Dec 6, 2022

  • Used connection.info instead of connection.get_parameter_status() and connection.server_info which don't exist in psycopg 3.
  • Set encoding using the client_encoding connection parameter instead of connection.set_client_encoding() that doesn't exist in psycopg 3.
  • Used the dbname connection parameter instead of deprecated alias - database.

- Used connection.info instead of connection.get_parameter_status() and
  connection.server_info which don't exist in psycopg 3.
- Set encoding using the client_encoding connection parameter instead
  of connection.set_client_encoding() that doesn't exist in psycopg 3.
- Used the dbname connection parameter instead of deprecated
  alias - database.
@felixxm
Copy link
Member Author

felixxm commented Dec 6, 2022

Merged in 6a21658.

@felixxm felixxm closed this Dec 6, 2022
@felixxm felixxm deleted the psycopg3-connection-cleanups branch December 6, 2022 11:52
@@ -186,16 +186,16 @@ def get_connection_params(self):
self.ops.max_name_length(),
)
)
conn_params = {}
conn_params = {"client_encoding": "UTF8"}
Copy link
Contributor

@andersk andersk Apr 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This value is never used because conn_params is unconditionally overwritten below.

https://code.djangoproject.com/ticket/34470

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants