Re: jsonapi: scary new warnings with LTO enabled

Daniel Gustafsson <daniel@yesql.se>

From: Daniel Gustafsson <daniel@yesql.se>
To: Jacob Champion <jacob.champion@enterprisedb.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2025-04-22T10:10:29Z
Lists: pgsql-hackers

Attachments

> On 21 Apr 2025, at 20:58, Jacob Champion <jacob.champion@enterprisedb.com> wrote:

> Personally, I'm fine with can't-fail APIs, as long as they're
> documented as such. (I think the deferred error API was probably
> chosen so that src/common JSON clients could be written without a lot
> of pain?)

My preference is that no operation can silently work on a failed object, but
it's not a hill (even more so given where we are in the cycle).  The attached
v3 allocates via the JSON api, no specific error handling should be required as
it's already handled today.

--
Daniel Gustafsson

Commits

  1. Allocate JsonLexContexts on the heap to avoid warnings