Referencia · §8.14

Errors and hints

error, hint

Ez az oldal a nucleus saját dokumentációjából készül, ezért angol nyelvű.

An Error is a SQLSTATE, a message and perhaps a hint: what to do about it, for people and for models. Sites that know more attach their own (Error::with_hint): an unknown column — the one meant (Perhaps you meant column "email"., by edit distance with swaps, a third of the letters at most), else the columns in scope when there are 12 or fewer; an unknown table or FROM entry — the one meant, else the tables; an unknown function — the one meant (aggregates too), a wrong argument count — the counts it takes; a comparison of two types — the cast. The session gives the rest a hint by code (hint::complete): 25P02 ROLLBACK, 40001 run it again, 23502, 23505, 42501 GRANT, 22003 a wider type, 22012 NULLIF, 21000 LIMIT 1, 42P07 IF NOT EXISTS, 42804 and argument types — a cast. On the wire: ncp 5’s E (§10), pg-compat’s H field (psql’s HINT:).