e use of this function is complex enough to
    require some explanation.
   </p><p>
    There are two required elements for every message: a severity level
    (ranging from <code class="literal">DEBUG</code> to <code class="literal">PANIC</code>) and a primary
    message text.  In addition there are optional elements, the most
    common of which is an error identifier code that follows the SQL spec's
    SQLSTATE conventions.
    <code class="function">ereport</code> itself is just a shell macro that ex