Re: cast result of copyNode()

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: cast result of copyNode()
Дата
Msg-id bf0dc8e7-c51c-5d20-6829-7857e77dae8b@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: [HACKERS] cast result of copyNode()  (Mark Dilger <hornschnorter@gmail.com>)
Список pgsql-hackers
On 3/21/17 18:52, Mark Dilger wrote:
> The patch applies cleanly, compiles, and passes all the regression tests
> for me on my laptop.  Peter appears to have renamed the function copyObject
> as copyObjectImpl, which struct me as odd when I first saw it, but I don't have
> a better name in mind, so that seems ok.

Committed that.

> If the purpose of this patch is to avoid casting so many things down to (Node *),
> perhaps some additional work along the lines of the patch I'm attaching are
> appropriate.  (This patch applies on top Peter's v2 patch).  The idea being to
> keep objects as (Expr *) where appropriate, rather than casting through (Node *)
> quite so much.

And that.

The distinction between Node and Expr is more theoretical and not
handled very ridigly throughout the code.  However, your patch seemed
like a gentle improvement in relatively new code, so it seems like a
good change.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Getting server crash after running sqlsmith
Следующее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Re: Missing increment of vacrelstats->pinskipped_pages