More advanced topics¶

Once you have familiarised yourself with the Psycopg basic operations, you can take a look at the chapter of this section for more advanced usages.

Contents:

  • Asynchronous operations
    • with async connections
    • Asynchronous notifications
    • Detecting disconnections
  • Static Typing
    • Generic types
    • Type of rows returned
    • Example: returning records as Pydantic models
  • Row factories
    • Creating new row factories
  • Connection pools
    • Pool life cycle
    • Using connections from the pool
    • Pool connection and sizing
    • Connections quality
    • Pool stats
  • Cursor types
    • Client-side cursors
    • Server-side cursors
    • “Stealing” an existing cursor
  • Data adaptation configuration
    • Writing a custom adapter: XML
    • Example: PostgreSQL numeric to Python float
    • Example: handling infinity date
    • Dumpers and loaders life cycle
  • Prepared statements

psycopg

Navigation

  • Getting started with Psycopg 3
  • More advanced topics
    • Asynchronous operations
    • Static Typing
    • Row factories
    • Connection pools
    • Cursor types
    • Data adaptation configuration
    • Prepared statements
  • Psycopg 3 API
  • Release notes

Related Topics

  • Documentation overview
    • Previous: Differences from psycopg2
    • Next: Asynchronous operations

Quick search

©2020-2022, Daniele Varrazzo and The Psycopg Team. | Powered by Sphinx 4.5.0 & Alabaster 0.7.12 | Page source