Skip to content

Commit 286232e

Browse files
committed
Add new 9.5 error codes
1 parent da08d64 commit 286232e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

build.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::io::{Write, BufWriter};
66
use std::path::Path;
77
use std::convert::AsRef;
88

9-
// From http://www.postgresql.org/docs/9.2/static/errcodes-appendix.html
9+
// From http://www.postgresql.org/docs/9.5/static/errcodes-appendix.html
1010
const SQLSTATES: &'static [(&'static str, &'static str)] = &[
1111
// Class 00 — Successful Completion
1212
("00000", "SuccessfulCompletion"),
@@ -93,6 +93,8 @@ const SQLSTATES: &'static [(&'static str, &'static str)] = &[
9393
("2201B", "InvalidRegularExpression"),
9494
("2201W", "InvalidRowCountInLimitClause"),
9595
("2201X", "InvalidRowCountInResultOffsetClause"),
96+
("2202H", "InvalidTablesampleArgument"),
97+
("2202G", "InavlidTablesampleRepeat"),
9698
("22009", "InvalidTimeZoneDisplacementValue"),
9799
("2200C", "InvalidUseOfEscapeCharacter"),
98100
("2200G", "MostSpecificTypeMismatch"),
@@ -181,6 +183,7 @@ const SQLSTATES: &'static [(&'static str, &'static str)] = &[
181183
("39004", "NullValueNotAllowedExternalRoutine"),
182184
("39P01", "TriggerProtocolViolated"),
183185
("39P02", "SrfProtocolViolated"),
186+
("39P03", "EventTriggerProtocolViolated"),
184187

185188
// Class 3B — Savepoint Exception
186189
("3B000", "SavepointException"),
@@ -318,6 +321,7 @@ const SQLSTATES: &'static [(&'static str, &'static str)] = &[
318321
("P0001", "RaiseException"),
319322
("P0002", "NoDataFound"),
320323
("P0003", "TooManyRows"),
324+
("P0004", "AssertFailure"),
321325

322326
// Class XX — Internal Error
323327
("XX000", "InternalError"),

0 commit comments

Comments
 (0)