pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Replace run-time error check with assertion
Date: Tue, 25 May 2021 10:51:23 -0400
Message-ID: <1210610.1621954283@sss.pgh.pa.us> (raw)
In-Reply-To: <452e9df8-ec89-e01b-b64a-8cc6ce830458@enterprisedb.com>
References: <452e9df8-ec89-e01b-b64a-8cc6ce830458@enterprisedb.com>

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





view thread (2+ messages)

Message-ID: <1210610.1621954283@sss.pgh.pa.us>
Permalink:  ../1210610.1621954283@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1210610.1621954283@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, peter.eisentraut@enterprisedb.com
  Subject: Re: Replace run-time error check with assertion
  In-Reply-To: <1210610.1621954283@sss.pgh.pa.us>
  References: <452e9df8-ec89-e01b-b64a-8cc6ce830458@enterprisedb.com> <1210610.1621954283@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox