rewrite ExecPartitionCheckEmitError

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

rewrite ExecPartitionCheckEmitError

Alvaro Herrera-9
Just on cleanliness grounds, I propose to rewrite the function in
$SUBJECT.  I came across this while reviewing some already-committed
patch for partition pruning, and it's been sitting in my laptop ever
since.

I think the current coding is too convoluted and hard to follow.  The
patch makes it much simpler (IMO).

--
Álvaro Herrera

0001-rewrite-ExecPartitionCheckEmitError.patch (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: rewrite ExecPartitionCheckEmitError

Robert Haas
On Thu, Dec 6, 2018 at 5:22 PM Alvaro Herrera <[hidden email]> wrote:
> Just on cleanliness grounds, I propose to rewrite the function in
> $SUBJECT.  I came across this while reviewing some already-committed
> patch for partition pruning, and it's been sitting in my laptop ever
> since.
>
> I think the current coding is too convoluted and hard to follow.  The
> patch makes it much simpler (IMO).

I don't really think this is an improvement, but the only part I
really dislike is s/val_desc/valdsc/.  That is surely not an
improvement in readability.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company