From f7af1cf312aab6da4efa56bf37951a39a7e6086a Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Wed, 13 Apr 2022 00:22:04 +0200 Subject: [PATCH] docs: a few clarifications about composite adaptation --- docs/basic/pgtypes.rst | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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 -- 2.47.3