Re: [PATCH] Make jsonapi usable from libpq

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: [PATCH] Make jsonapi usable from libpq
Дата
Msg-id A9C1EB9B-F3BF-4A2E-B46A-F301348E272A@yesql.se
обсуждение исходный текст
Ответ на Re: [PATCH] Make jsonapi usable from libpq  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> On 28 Jun 2021, at 21:15, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> I wrote:
>>> Not real sure what to do about PGTHREAD_ERROR.
>
>> I wonder if we shouldn't simply nuke that macro and change the
>> call sites into "Assert(false)".
>
> After further study this still seems like the best available choice.

While this solution has a potential downside as you mention upthread, I can't
see any better alternative, and this is clearly better than what we have now.

> My proposal is to replace PGTHREAD_ERROR by Assert(false)
> in HEAD, but leave things alone in the back branches.

+1

> As far as the other patch to check for mistakes with "nm"
> goes, we could either do nothing in the back branches, or
> install a check for "exit" only, not "abort".  But there's
> probably no real need for such a check in the back branches
> as long as we're enforcing it in HEAD.

I don't see any real reason to backport the check, but enforce it in HEAD going
forward.  The risk of introducing an exit in backbranches when enforced against
in HEAD seem pretty manageable.

--
Daniel Gustafsson        https://vmware.com/




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Elijah Stone
Дата:
Сообщение: Re: Composite types as parameters
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Preventing abort() and exit() calls in libpq