explan refactoring

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: explan refactoring
Date: 2009-05-30 03:48:54
Message-ID: 603c8f070905292048y804d505wf701214e7b81fde7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

As I was trying to figure out the least invasive way to make
explain_outNode() support machine-readable output, I noticed that
there is a whole pile of duplicated code for dealing with scan
targets. The attached refactoring may be worth applying independently
of what happens with the rest of the project, so it's attached here
for review and comment.

This also removes a redundant branch of a switch further down, folding
T_SubqueryScan into the preceding chunk.

It's tempting to simplify this further by ripping some of the asserts
out of ExplainScanTarget() on the theory that, while it may be good
sanity checking, it's not really EXPLAIN's job to do this type of
validation. But I've left them alone for now.

...Robert

Attachment Content-Type Size
explain_refactor.patch text/x-diff 6.9 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Sushant Sinha 2009-05-30 05:59:29 dot to be considered as a word delimiter?
Previous Message Bruce Momjian 2009-05-30 02:39:25 Re: libpq is not thread safe