Re: making the backend's json parser work in frontend code
От | Tom Lane |
---|---|
Тема | Re: making the backend's json parser work in frontend code |
Дата | |
Msg-id | 17499.1580235378@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: making the backend's json parser work in frontend code (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: making the backend's json parser work in frontend code
|
Список | pgsql-hackers |
Robert Haas <robertmhaas@gmail.com> writes: > On Tue, Jan 28, 2020 at 11:35 AM Tom Lane <tgl@sss.pgh.pa.us> wrote: >> 3. Some compilers still don't understand that elog(ERROR) doesn't >> return, so you need a dummy return. Perhaps pg_unreachable() >> would do as well, but project style has been the dummy return for >> a long time ... and I'm not entirely convinced by the assumption >> that every compiler understands pg_unreachable(), anyway. > Is the example of CreateDestReceiver() sufficient to show that this is > not a problem in practice? Dunno. I don't see any warnings about that in the buildfarm, but that's not a very large sample of non-gcc compilers. Another angle here is that on non-gcc compilers, pg_unreachable() is going to expand to an abort() call, which is likely to eat more code space than a dummy "return 0". regards, tom lane
В списке pgsql-hackers по дате отправления: