Error handling expectations

Поиск
Список
Период
Сортировка
От James Coleman
Тема Error handling expectations
Дата
Msg-id CAAaqYe_=kbL8vB0gai76C9RcTh5E3NsZC++BzstVQm=+0Hqt0w@mail.gmail.com
обсуждение исходный текст
Ответы Re: Error handling expectations
Список pgsql-hackers
I'm working on adding a tuple_data_record function to pageinspect to parallel tuple_data_split (returning the record type of the relation being examined rather than an array of attributes as on-disk byte data).

This my first real foray into the Postgres codebase, so an beginner question: I noticed that existing C functions in pageinspect often do error checking and then report the error with ereport but still continue on to execute the rest of the function instead of early returning. Is this standard practice? Or should I be reporting the error and then cleaning up and returning rather than continuing to execute?

Thanks,
James Coleman

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Re[2]: [PATCH] Change simple_heap_insert() to a macro
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Error handling expectations