Name
sql_warning, sql_warnings_resignal — emit and re-emit SQL warnings from procedure code
Synopsis
sql_warning(
|
in sql_state varchar, |
| in virt_code varchar, | |
in message varchar); |
sql_warnings_resignal(
|
in warnings any); |
Description
sql_warning attaches a SQL warning record to the
current connection's diagnostic area without raising an error.
sql_state is the 5-character SQLSTATE,
virt_code is the Virtuoso-specific short error code
(e.g. SR000) and message is the
human-readable text. Client applications retrieve queued warnings through
the SQLGetDiagRec ODBC API or its JDBC equivalent.
sql_warnings_resignal takes a vector of warning
records that were previously captured (for example by reading the
diagnostic area in a wrapper procedure) and re-emits each one as a fresh
warning on the current connection. Each element of
warnings must be an error-report box; invalid
entries cause SQL error 22023 (SR454 or SR455).