pub fn report_error(code: PgSqlErrorCode, msg: &str)
Expand description
Report error to Postgres using ereport!
A simple wrapper of Postgresās ereport!
function to emit error message and
aborts the current transaction.
For example,
use pgrx::prelude::PgSqlErrorCode;
report_error(
PgSqlErrorCode::ERRCODE_FDW_INVALID_COLUMN_NUMBER,
&format!("target column number not match"),
);