| От | Mats Kindahl |
|---|---|
| Тема | Refactor StringInfo usage in subscriptioncmds.c |
| Дата | |
| Msg-id | 0b381b02-cab9-41f9-a900-ad6c8d26c1fc@gmail.com обсуждение |
| Ответы |
Re: Refactor StringInfo usage in subscriptioncmds.c
Re: Refactor StringInfo usage in subscriptioncmds.c |
| Список | pgsql-hackers |
Hi all, As discussed in [1] the functions check_publications_origin_tables() and check_publications_origin_sequences() are building error messages using dynamically allocated StringInfo instances only to avoid duplicating a call of ereport(). Attached is a proposal that instead of building error message and hints dynamically, it will use ereport() directly and as a result does not have to allocate the error message strings and error message hints dynamically and these can be removed. This also means that a previous use of gettext() (in the form of the "_" macro) is not needed any more and we can use errmsg() and errhint() rather than errmsg_internal() and errhint_internal() with ereport(). It also replaces the usage a dynamically allocated StringInfo of pubnames containing the publication names with a stack allocated StringInfoData, along the same line as in [2]. [1]: https://www.postgresql.org/message-id/CAApHDvrZnM28wa2VY58cvtY0y9XbMhKJH4m%3Dga3c1wfsx%3DMF4Q%40mail.gmail.com [2]: https://www.postgresql.org/message-id/flat/CAApHDvrZnM28wa2VY58cvtY0y9XbMhKJH4m%3Dga3c1wfsx%3DMF4Q%40mail.gmail.com#ba34970e59f9fd847f1ab52777d57edc
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера