From: Daniele Varrazzo Date: Sun, 26 Sep 2021 23:26:59 +0000 (+0200) Subject: Document that client_encoding is gone X-Git-Tag: 3.0~54^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0ea1ad06e65c1af401db01fcc482216a2f9913cc;p=thirdparty%2Fpsycopg.git Document that client_encoding is gone --- diff --git a/docs/basic/from_pg2.rst b/docs/basic/from_pg2.rst index a042dc390..e6bfec6f1 100644 --- a/docs/basic/from_pg2.rst +++ b/docs/basic/from_pg2.rst @@ -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 ----------------------- diff --git a/docs/news.rst b/docs/news.rst index d981bdcc1..ba5e40331 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -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