isDropTableOnViewError checks if the error indicates that a DROP TABLE was attempted on a view. DuckDB returns: "Catalog Error: Existing object X is of type View, trying to drop type Table"
(err error)
| 329 | // failure is user-attributable (Info-level "Query execution failed.") |
| 330 | // or a real system error worth alerting on (Error-level "Query |
| 331 | // execution errored."). The discriminator is the SQLSTATE class — |
| 332 | // already computed via classifyErrorCode for the pgwire response. |
| 333 | // |
| 334 | // Cancellations (SQLSTATE 57014) are NOT short-circuited as user errors |
| 335 | // here. The call sites (logQueryError, the clientConn error paths) gate |
| 336 | // caller-driven cancellations upstream via clientConn.isCallerCancellation, |
| 337 | // so by the time isUserQueryError sees a cancel-shaped err the cancellation |
| 338 | // was infra-driven (gRPC client closed because the worker died, the worker |
| 339 | // was retired, etc.) and class 57 = operator intervention is the right |
| 340 | // bucket — that's a real failure we want surfaced at Error level. |
| 341 | func isUserQueryError(err error) bool { |
| 342 | if err == nil { |