Re: [HACKERS] cast result of copyNode()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] cast result of copyNode()
Дата
Msg-id 10066.1488929655@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] cast result of copyNode()  (Mark Dilger <hornschnorter@gmail.com>)
Список pgsql-hackers
Mark Dilger <hornschnorter@gmail.com> writes:
> You appear to be using a #define macro to wrap a function of the same name
> with the code:

> #define copyObject(obj) ((typeof(obj)) copyObject(obj))

> I don't necessarily have a problem with that, but it struck me as a bit odd, and
> grep'ing through the sources, I don't see anywhere else in the project where that
> is done for a function of the same number of arguments, and only one other
> place where it is done at all:

I agree that that seems like a bad idea.  Better to rename the underlying
function --- for one thing, that provides an "out" if some caller doesn't
want this behavior.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: [HACKERS] Proposal for changes to recovery.conf API
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Write Ahead Logging for Hash Indexes