">ereport</code> might look like this:
</p><pre class="programlisting">
ereport(ERROR,
        errcode(ERRCODE_DIVISION_BY_ZERO),
        errmsg("division by zero"));
</pre><p>
    This specifies error severity level <code class="literal">ERROR</code> (a run-of-the-mill
    error).  The <code class="function">errcode</code> call specifies the SQLSTATE error code
    using a macro defined in <code class="filename">src/include/utils/errcodes.h</code>.  The
    <code class="function">errmsg</code> call provide