Re: pgsql: Remove unnecessary casts in free() and pfree()
В списке pgsql-committers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: pgsql: Remove unnecessary casts in free() and pfree() |
| Дата | |
| Msg-id | 2342337.1661611779@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: pgsql: Remove unnecessary casts in free() and pfree() (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-committers |
I wrote:
> Justin Pryzby <pryzby@telsasoft.com> writes:
>> This seems to be breaking cfbot's "warnings" test.
> Hmm, well, casting away const is certainly not within pfree's remit,
> so I'm glad we changed this.
Oh, I see: sepgsql's quote_object_name() is doing
const char *temp;
temp = quote_identifier(src1);
appendStringInfoString(&result, temp);
if (src1 != temp)
pfree(temp);
evidently because whoever wrote this felt a compulsion to override
quote_identifier's judgment that possibly leaking the quoted identifier
wasn't worth worrying about. I think we should just nuke this code
altogether and write
appendStringInfoString(&result, quote_identifier(src1));
regards, tom lane
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера