Re: Support json_errdetail in FRONTEND builds

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Daniel Gustafsson <daniel(at)yesql(dot)se>, Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, alvherre(at)alvh(dot)no-ip(dot)org
Subject: Re: Support json_errdetail in FRONTEND builds
Date: 2024-03-15 01:04:53
Message-ID: 2406032.1710464693@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Paquier <michael(at)paquier(dot)xyz> writes:
> Hmm. I am not sure how much protection this would offer, TBH. One
> thing that I find annoying with common/stringinfo.c as it is currently
> is that we have two exit() calls in the enlarge path, and it does not
> seem wise to me to spread that even more.

> My last argument sounds like a nit for HEAD knowing that this does not
> impact libpq that has its own pqexpbuffer.c to avoid issues with
> palloc, elog and exit, but that could be a problem if OAuth relies
> more on these code paths in libpq.

I hope nobody is expecting that such code will get accepted. We have
a policy (and an enforcement mechanism) that libpq.so must not call
exit(). OAuth code in libpq will need to cope with using pqexpbuffer.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message James Coleman 2024-03-15 01:06:54 Re: [DOCS] HOT - correct claim about indexes not referencing old line pointers
Previous Message Melanie Plageman 2024-03-15 00:56:58 Re: Combine Prune and Freeze records emitted by vacuum