The package exports string constants representing specific PostgreSQL error codes. These can be used for exact matching or passed to the Is... helper functions.
Note: This segment contains constants for Classes 00 through XX (excluding some specific sub-classes).
// Example of using constants for exact matching
if errCode == pgerrcode.UniqueViolation {
// handle unique constraint violation
}
// Example of using constants with helper functions
if pgerrcode.IsConnectionException(errCode) {
// handle connection issues
}