From: Daniele Varrazzo Date: Tue, 12 Apr 2022 22:22:04 +0000 (+0200) Subject: docs: a few clarifications about composite adaptation X-Git-Tag: 3.1~140 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7af1cf312aab6da4efa56bf37951a39a7e6086a;p=thirdparty%2Fpsycopg.git docs: a few clarifications about composite adaptation --- diff --git a/docs/basic/pgtypes.rst b/docs/basic/pgtypes.rst index eeaaea1c5..2f15e93cb 100644 --- a/docs/basic/pgtypes.rst +++ b/docs/basic/pgtypes.rst @@ -26,7 +26,8 @@ Composite types casting Psycopg can adapt PostgreSQL composite types (either created with the |CREATE TYPE|_ command or implicitly defined after a table row type) to and from -Python tuples or `~collections.namedtuple`. +Python tuples, `~collections.namedtuple`, or any other suitable object +configured. .. |CREATE TYPE| replace:: :sql:`CREATE TYPE` .. _CREATE TYPE: https://www.postgresql.org/docs/current/static/sql-createtype.html @@ -38,7 +39,8 @@ using `~psycopg.types.composite.register_composite()`. .. autoclass:: psycopg.types.composite.CompositeInfo `!CompositeInfo` is a `~psycopg.types.TypeInfo` subclass: check its - documentation for generic details. + documentation for the generic usage, especially the + `~psycopg.types.TypeInfo.fetch()` method. .. attribute:: python_type @@ -149,7 +151,8 @@ its subtype and make it work like the builtin ones. .. autoclass:: psycopg.types.range.RangeInfo `!RangeInfo` is a `~psycopg.types.TypeInfo` subclass: check its - documentation for generic details. + documentation for generic details, especially the + `~psycopg.types.TypeInfo.fetch()` method. .. autofunction:: psycopg.types.range.register_range @@ -219,7 +222,8 @@ multirange type with its subtype and make it work like the builtin ones. .. autoclass:: psycopg.types.multirange.MultirangeInfo `!MultirangeInfo` is a `~psycopg.types.TypeInfo` subclass: check its - documentation for generic details. + documentation for generic details, especially the + `~psycopg.types.TypeInfo.fetch()` method. .. autofunction:: psycopg.types.multirange.register_multirange