pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Staroverov Ilja <i.staroverov@ftdata.ru>
Cc: Sami Imseih <samimseih.pg@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: pg_stat_statements replaces SQL/JSON ON EMPTY / ON ERROR keywords with parameters
Date: Fri, 23 Oct 2026 17:02:06 +0900
Message-ID: <atsUfsDjdudiJAL9@paquier.xyz> (raw)
In-Reply-To: <83202E93-9039-410B-B4F2-A141DD7D80E1@localhost.localdomain>
References: <457969A9-5D24-422F-B09E-F388053DE028@localhost.localdomain>
	<athe8udYm0H_xy0q@paquier.xyz>
	<E00D8F2E-7706-4227-8FE9-C899FAFB4C3C@localhost.localdomain>
	<atnJJiWcHyhd8_NI@paquier.xyz>
	<83202E93-9039-410B-B4F2-A141DD7D80E1@localhost.localdomain>

On Thu, Oct 22, 2026 at 10:52:28AM +0000, Staroverov Ilja wrote:
> 0001 fixes all of them in the new tests, for example:

      errmsg("cannot cast behavior expression of type %s to %s",
             format_type_be(exprType(expr)),
             format_type_be(returning->typid)),
-     parser_errposition(pstate, exprLocation(expr)));
+     parser_errposition(pstate, location));

While looking at v5-0001, I have been puzzled by this piece, because
it is actually not reachable with any normal means or even SQL.
Anyway, I get that Amit wanted this part to be defensive, so your
suggestion of using the behavior's location sounds good to me.

Applied this part.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (12+ messages)  latest in thread

Message-ID: <atsUfsDjdudiJAL9@paquier.xyz>
Permalink:  ../atsUfsDjdudiJAL9@paquier.xyz/
Also on:    postgresql.org/message-id/atsUfsDjdudiJAL9@paquier.xyz

 · 

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-bugs@postgresql.org
  Cc: michael@paquier.xyz, i.staroverov@ftdata.ru, samimseih.pg@gmail.com
  Subject: Re: pg_stat_statements replaces SQL/JSON ON EMPTY / ON ERROR keywords with parameters
  In-Reply-To: <atsUfsDjdudiJAL9@paquier.xyz>
  References: <457969A9-5D24-422F-B09E-F388053DE028@localhost.localdomain> <athe8udYm0H_xy0q@paquier.xyz> <E00D8F2E-7706-4227-8FE9-C899FAFB4C3C@localhost.localdomain> <atnJJiWcHyhd8_NI@paquier.xyz> <83202E93-9039-410B-B4F2-A141DD7D80E1@localhost.localdomain> <atsUfsDjdudiJAL9@paquier.xyz>

* 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