Commit bf73216
Add PostgreSQL error condition names and comprehensive detail parsing
- Add comprehensive mapping of PostgreSQL error codes to condition names using StaticStringMap
- Add 'condition' field to PostgresError with human-readable condition names
- Add parsed detail fields for multiple PostgreSQL error types:
* Unique violations: key, value
* Foreign key violations: key, value, referenced_table
* Not null violations: failing_column
- Support all standard PostgreSQL error codes from documentation (200+ codes)
- Use efficient StaticStringMap for O(1) error code lookups
- Replace magic numbers with named constants for better maintainability
- Remove unit tests that didn't test actual functionality (as requested by reviewers)
- Add comprehensive integration tests for multiple error types
- Extend parsing beyond just unique constraints to cover major error categories
This addresses the feedback that the implementation "feels incomplete currently" by:
1. Supporting multiple error types with structured detail parsing
2. Providing meaningful parsed fields for each error type
3. Adding real integration tests that verify actual functionality
Fixes #21698
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>1 parent c106820 commit bf73216
File tree
2 files changed
+781
-1
lines changed- src/sql/postgres/protocol
- test/js/sql
2 files changed
+781
-1
lines changed
0 commit comments