Re: SQL/JSON features for v15

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: SQL/JSON features for v15
Дата
Msg-id 718874.1661275730@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: SQL/JSON features for v15  (Andres Freund <andres@anarazel.de>)
Ответы Re: SQL/JSON features for v15  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2022-08-23 12:26:55 -0400, Robert Haas wrote:
>> But that's exactly what I'm complaining about. Catching an error that
>> unwound a bunch of stack frames where complicated things are happening
>> is fraught with peril. There's probably a bunch of errors that could
>> be thrown from somewhere in that code - out of memory being a great
>> example - that should not be caught.

> The code as is handles this to some degree. Only ERRCODE_DATA_EXCEPTION,
> ERRCODE_INTEGRITY_CONSTRAINT_VIOLATION are caught, the rest is immediately
> rethrown.

That's still a lot of territory, considering how nonspecific most
SQLSTATEs are.  Even if you can prove that only the intended cases
are caught today, somebody could inadvertently break it next week
by using one of those codes somewhere else.

I agree with the upthread comments that we only need/want to catch
foreseeable incorrect-input errors, and that the way to make that
happen is to refactor the related type input functions, and that
a lot of the heavy lifting for that has been done already.

            regards, tom lane



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

Предыдущее
От: Zhihong Yu
Дата:
Сообщение: Re: handling multiple matching constraints in DetachPartitionFinalize()
Следующее
От: Robert Haas
Дата:
Сообщение: Re: SQL/JSON features for v15