buggins / ddbc

DDBC is DB Connector for D language (similar to JDBC)
78 stars 45 forks source link

Catch PostgreSQL fatal errors when running queries. #126

Closed vnayar closed 2 months ago

vnayar commented 2 months ago

Currently, when executing queries, especially within a transaction, behavior is error-prone. Executing a query such as select '+10000-01-01'::date; results in an error, but it is not caught, thus further queries silently also have errors, and at the end of the transaction, a failure to commit occurs. Debugging where the original error occurred is extremely difficult.

This change makes it so that errors are reported when they occur, improving developer experience.