pub enum EvalError {
QualifiedColumnNotFound {
qualifier: String,
column: String,
},
WrongArity {
name: String,
types: String,
},
ColumnNotFound {
name: String,
},
UnknownQualifier {
qualifier: String,
column: String,
},
DivisionByZero,
TypeMismatch {
detail: String,
},
PlaceholderOutOfRange {
n: u16,
bound: u16,
},
StackDepthExceeded,
}Variants§
QualifiedColumnNotFound
v7.39.2 — a qualified reference whose QUALIFIER resolves but whose column does not. PostgreSQL prints it unquoted and dotted; see the Display impl.
WrongArity
v7.39.2 — a built-in called with the wrong NUMBER of arguments.
Its own variant rather than a formatted string, because the two
wires word it differently AND number it differently, and one of
them has to tell it apart from “no such function”: MySQL 9.7.2
answers 1582 Incorrect parameter count in the call to native function 'LOWER' here and 1305 for a name it does not know,
where PostgreSQL gives BOTH the same sentence.
ColumnNotFound
UnknownQualifier
Fields
column: Stringv7.39.2 — the column that was written after it.
PostgreSQL names only the missing table; MySQL 9.7.2 names
the whole reference — Unknown column 'zz.a' in 'where clause' — and numbers it 1054, a COLUMN error. SPG answered
1146, which is what a driver reads as “that table is gone”.
The name has to travel for the MySQL wire to say it.
DivisionByZero
TypeMismatch
PlaceholderOutOfRange
v6.1.1 — $N reference past the number of bound parameters.
Either the client sent too few in Bind, or the SQL has a
placeholder the prepared statement didn’t account for.
StackDepthExceeded
v7.38 (read01 P3.25) — the expression tree recursed deep enough to
threaten a native stack overflow; we bail out with an error the way
PG’s check_stack_depth() does instead of aborting the process.