Re: What about a castNode() macro?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: What about a castNode() macro?
Дата
Msg-id 9403.1398792770@sss.pgh.pa.us
обсуждение исходный текст
Ответ на What about a castNode() macro?  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers
Andres Freund <andres@2ndquadrant.com> writes:
> There's a repeated pattern of

> Assert(IsA(ptr, nodetype));
> foo = (nodetype *) ptr;

> how about adding a castNode() that combines those?

Doesn't really seem worth it.  The notational advantage is not great,
and to the extent that it were to touch a lot of places, the main outcome
would be pain for back-patching.
        regards, tom lane



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

Предыдущее
От: Keith Fiske
Дата:
Сообщение: Re: pg_dump --pretty-print-views
Следующее
От: Greg Stark
Дата:
Сообщение: Re: pg_dump --pretty-print-views