summaryrefslogtreecommitdiff
path: root/doc/src/faq.rst
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2012-02-24 00:33:28 +0000
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2012-02-24 00:33:28 +0000
commita165f861270994da0435e42e568f8e4327bd8251 (patch)
tree3a60f45b9e949928231f568f13f9dddc6b54a6fa /doc/src/faq.rst
parent0c337a20290a766c13c0c0674c2ab079be5f6768 (diff)
downloadpsycopg2-a165f861270994da0435e42e568f8e4327bd8251.tar.gz
Added docs about how to create a generic array typecaster
Diffstat (limited to 'doc/src/faq.rst')
-rw-r--r--doc/src/faq.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/src/faq.rst b/doc/src/faq.rst
index 3296cd8..8afc478 100644
--- a/doc/src/faq.rst
+++ b/doc/src/faq.rst
@@ -109,6 +109,13 @@ Transferring binary data from PostgreSQL 9.0 doesn't work.
.. __: http://www.postgresql.org/docs/9.0/static/datatype-binary.html
.. __: http://www.postgresql.org/docs/9.0/static/runtime-config-client.html#GUC-BYTEA-OUTPUT
+Arrays of *TYPE* are not casted to list.
+ Arrays are only casted to list when their oid is known, and an array
+ typecaster is registered for them. If there is no typecaster, the array is
+ returned unparsed from PostgreSQL (e.g. ``{a,b,c}``). It is easy to create
+ a generic arrays typecaster, returning a list of array: an example is
+ provided in the `~psycopg2.extensions.new_array_type()` documentation.
+
Best practices
--------------