Hide navigation sidebar
Hide table of contents sidebar
Back to top
Toggle table of contents sidebar

# 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
  - Interrupting async operations using Ctrl-C
  - Gevent support
  - Server messages
  - Asynchronous notifications
  - Detecting disconnections
- Static Typing
  - Generic types
  - Type of rows returned
  - Example: returning records as Pydantic models
  - Checking literal strings in queries
- Row factories
  - Creating new row factories
- Connection pools
  - Pool life cycle
  - Connections life cycle
  - Using connections from the pool
  - Pool connection and sizing
  - Null connection pools
  - Connection quality
  - Pool stats
- Cursor types
  - Client-side cursors
  - Client-side-binding cursors
  - Server-side cursors
- 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
- Pipeline mode support
  - Client-server messages flow
  - Pipeline mode usage
  - Synchronization points
  - The fine prints