Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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.


Attachment: explain_refactor.patch
Description: text/x-diff (6.9 KB)

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group