Thread

Commits

  1. Replace run-time error check with assertion

  1. Replace run-time error check with assertion

    Peter Eisentraut <peter.eisentraut@enterprisedb.com> — 2021-05-25T09:28:56Z

    In the attached patch, the error message was checking that the 
    structures returned from the parser matched expectations.  That's 
    something we usually use assertions for, not a full user-facing error 
    message.  So I replaced that with an assertion (hidden inside 
    lfirst_node()).
    
  2. Re: Replace run-time error check with assertion

    Tom Lane <tgl@sss.pgh.pa.us> — 2021-05-25T14:51:23Z

    Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:
    > In the attached patch, the error message was checking that the 
    > structures returned from the parser matched expectations.  That's 
    > something we usually use assertions for, not a full user-facing error 
    > message.  So I replaced that with an assertion (hidden inside 
    > lfirst_node()).
    
    Works for me.  It's certainly silly to use a translatable ereport
    rather than elog for this.
    
    Localizing those variables some more looks sane too.
    
    			regards, tom lane