Re: Use stack-allocated StringInfoData
| От | David Rowley |
|---|---|
| Тема | Re: Use stack-allocated StringInfoData |
| Дата | |
| Msg-id | CAApHDvoMsPQS8jsPE2-nOGdp2ABOPWx-WwoRdjN6G4G8nwfqdg@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Use stack-allocated StringInfoData (Álvaro Herrera <alvherre@kurilemu.de>) |
| Список | pgsql-hackers |
On Fri, 7 Nov 2025 at 00:24, Álvaro Herrera <alvherre@kurilemu.de> wrote: > Yeah, I came across this a few weeks ago as well. I was thinking maybe > we can expand the ereport() macro instead of duplicating things. It > looks a bit ugly and I don't think we do it anywhere else ... I mean > something like > > errstart(WARNING, NULL); > if (cond) > errmsg( ... ); > else > errmsg( ... ); > // and so on > errfinish(__FILE__, __LINE__, __func__); > > > Is this too ugly to live? (I swear I had this on a branch already, but > can't find it right this instant.) I thought it could just become 2 separate ereport calls. The duplicate string consts for the plural stuff are going to get de-duplicated anyway. I didn't try it to see how it'd look, however. David
В списке pgsql-hackers по дате отправления: