PsqlPy¶
Async PostgreSQL adapter using psqlpy, a Rust-backed PostgreSQL driver with native connection pooling.
Configuration¶
Extension Dialects¶
PsqlPy supports the pgvector and ParadeDB dialects for vector similarity search and full-text search operators. See the Dialects reference for operator details.
Driver¶
Data Dictionary¶
- class sqlspec.adapters.psqlpy.data_dictionary.PsqlpyDataDictionary[source]¶
Bases:
AsyncDataDictionaryBasePostgreSQL-specific async data dictionary via psqlpy.
- dialect: ClassVar[str] = 'postgres'¶
Dialect identifier. Must be defined by subclasses as a class attribute.
- async get_feature_flag(driver, feature)[source]¶
Check if PostgreSQL database supports a specific feature.
- Return type:
- async get_optimal_type(driver, type_category)[source]¶
Get optimal PostgreSQL type for a category.
- Return type:
- async get_tables(driver, schema=None)[source]¶
Get tables sorted by topological dependency order using Recursive CTE.
- Return type:
- async get_columns(driver, table=None, schema=None)[source]¶
Get column information for a table or schema.
- Return type:
- async get_indexes(driver, table=None, schema=None)[source]¶
Get index metadata for a table or schema.
- Return type: