PostgreSQL
PostgreSQL datasources use a high-performance native driver for optimized data transfer. No ODBC installation is required.See Supported Data Formats for database source categories and schema column types supported on PostgreSQL connections.
Connection configuration
URI format
Required fields
The native driver communicates with the database using the PostgreSQL binary protocol and produces data batches directly, avoiding row-by-row conversion overhead.
Example connection
Dataset configuration (data_args)
Required fields
Optional fields
table_options entry
Each entry intable_options describes a table to query:
Complete example
Connection
Dataset
Partitioned table example
For tables partitioned by date (e.g.,trades_2024_01, trades_2024_02):
Driver and dependencies
The native driver is bundled with CloudQuant Data Liberator. No additional driver installation is needed on the host system.
Troubleshooting
Connection refused
Verify the PostgreSQL server is accepting connections on the specified host and port. Checkpg_hba.conf for client authentication rules.
Authentication failed
Ensure theusername and password in the connection match a valid PostgreSQL role. Check that the role has CONNECT privilege on the database and SELECT privilege on the target tables.
SSL/TLS errors
If the server requires SSL, append?sslmode=require to the URI:
Empty results from partitioned tables
Verify thatdt_regex correctly matches the table name suffix and that dt_format corresponds to the captured groups. Test the regex against your actual table names.
Slow queries
- Increase
batch_sizefor large result sets (up to100000). - Ensure the datetime and key columns are indexed in PostgreSQL.
- Use
table_liketo target specific tables rather than scanning all partitions.

