]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Document that client_encoding is gone
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sun, 26 Sep 2021 23:26:59 +0000 (01:26 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sun, 26 Sep 2021 23:26:59 +0000 (01:26 +0200)
docs/basic/from_pg2.rst
docs/news.rst

index a042dc390ca7eea36cd4b2810f95178a6c006642..e6bfec6f1a6f3c69a420ef472667c6349c416991 100644 (file)
@@ -186,6 +186,19 @@ set-returning functions... Use a normal `~Cursor.execute()` with :sql:`SELECT
 function_name(...)` or :sql:`CALL procedure_name(...)` instead.
 
 
+.. _diff-client-encoding:
+
+``client_encoding`` is gone
+---------------------------
+
+Psycopg uses automatically the database client encoding to decode data to
+Unicode strings. Use `ConnectionInfo.encoding` if you need to read the
+encoding. You can select an encoding at connection time using the
+``client_encoding`` connection parameter and you can change the encoding of a
+connection by running a :sql:`SET client_encoding` statement... But why would
+you?
+
+
 What's new in Psycopg 3
 -----------------------
 
index d981bdcc18603b83d1726a4e04324ab7ff116e98..ba5e40331e8b98c0dc574a2aa00a251da575388d 100644 (file)
@@ -1,3 +1,5 @@
+.. currentmodule:: psycopg
+
 .. index::
     single: Release notes
     single: News
@@ -12,10 +14,12 @@ psycopg 3.0b2
 ^^^^^^^^^^^^^
 
 - Add :ref:`adapt-shapely` (:ticket:`#80`).
-- Add `psycopg.pq.__build_version__` constant.
+- Add `pq.__build_version__` constant.
 - Don't use the extended protocol with COPY, (:tickets:`#78, #82`).
-- Add *context* parameter to `~psycopg.Connection.connect()` (:ticket:`#83`).
-- Fix selection of dumper by oid after `~psycopg.Copy.set_types()`.
+- Add *context* parameter to `~Connection.connect()` (:ticket:`#83`).
+- Fix selection of dumper by oid after `~Copy.set_types()`.
+- Drop `!Connection.client_encoding`. Use `ConnectionInfo.encoding` to read
+  it, and a :sql:`SET` statement to change it.
 
 
 psycopg 3.0b1