Re: Some optimizations for COALESCE expressions during constant folding - Mailing list pgsql-hackers

From Dagfinn Ilmari Mannsåker
Subject Re: Some optimizations for COALESCE expressions during constant folding
Date
Msg-id 87h5ui6zfo.fsf@wibble.ilmari.org
Whole thread Raw
In response to Some optimizations for COALESCE expressions during constant folding  (Richard Guo <guofenglinux@gmail.com>)
List pgsql-hackers
Richard Guo <guofenglinux@gmail.com> writes:

> +                    ListCell   *lc;
> +
> +                    foreach(lc, coalesceexpr->args)
> +                    {
> +                        Node       *coalescearg = (Node *) lfirst(lc);

I have no comment on the rest of the patch, but this could be simplifed
using the foreach_ptr macro:

    foreach_ptr(Node, coalescearg, coalesceexpr->args)
    {

- ilmari



pgsql-hackers by date:

Previous
From: torikoshia
Date:
Subject: Re: RFC: Logging plan of the running query
Next
From: David Rowley
Date:
Subject: Re: Some optimizations for COALESCE expressions during constant folding