Re: [HACKERS] freefuncs.c is never called from anywhere!?
От | Tom Lane |
---|---|
Тема | Re: [HACKERS] freefuncs.c is never called from anywhere!? |
Дата | |
Msg-id | 13786.949204159@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: [HACKERS] freefuncs.c is never called from anywhere!? (Bruce Momjian <pgman@candle.pha.pa.us>) |
Список | pgsql-hackers |
Bruce Momjian <pgman@candle.pha.pa.us> writes: >> I was rather bemused to discover just now that the node-freeing >> functions in nodes/freefuncs.c are never called from anywhere; >> in fact, the module hasn't got a single exported entry point! > Are you sure about this? I thought these things were called from > macros. nm --defined --extern shows that freefuncs.o exports no symbols. Therefore it's impossible for any outside code to refer to it. (Hmm, I wonder if any other modules are equally dead?) > I would perhaps move it to a _deadcode directory and see > what happens. Or should we enable it? I certainly don't want to bit-bucket it --- I was just very surprised that it's not currently being used. After further consideration I realized that if RelationClearRelation uses freeObject() to flush rules, then a DROP on a view will exercise the code. So it's not quite as hard to test as I was thinking before. I'm leaning towards the "go for it" answer at the moment... regards, tom lane
В списке pgsql-hackers по дате отправления: