Re: Memory error in src/backend/replication/logical/origin.c
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Memory error in src/backend/replication/logical/origin.c |
| Дата | |
| Msg-id | 18632.1511720898@sss.pgh.pa.us обсуждение |
| Ответ на | Memory error in src/backend/replication/logical/origin.c (Mark Dilger <hornschnorter@gmail.com>) |
| Ответы |
Re: Memory error in src/backend/replication/logical/origin.c
|
| Список | pgsql-hackers |
Mark Dilger <hornschnorter@gmail.com> writes:
> bool nulls[Natts_pg_replication_origin];
> memset(&nulls, 0, sizeof(nulls));
> around lines 277 through 303. Patch below.
AFAIK this is not a bug, though I agree that dropping the "&" is probably
better style. The reason is that applying "&" to an undecorated array
name is basically a no-op, because without "&" the array name would decay
to a pointer anyway. With "&", the address-taking is explicit, but you
still get a pointer to the array, not a pointer to some pointer to the
array. Ain't C fun?
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера