Re: Remove unneeded left joins from psql - Mailing list pgsql-patches

From Tom Lane
Subject Re: Remove unneeded left joins from psql
Date
Msg-id 7427.1113285586@sss.pgh.pa.us
Whole thread Raw
In response to Remove unneeded left joins from psql  (Greg Sabino Mullane <greg@turnstep.com>)
Responses Re: Remove unneeded left joins from psql
List pgsql-patches
Greg Sabino Mullane <greg@turnstep.com> writes:
> here's a patch that does that and nothing more: removes all
> unnecessary left joins from psql. Done in the theory that we often
> point people to psql -E, so our queries there should be as correct
> as possible: if the joining column is not null, then we don't need
> a left join.

I'm still not happy about this.  "Joining column is not null" has
nothing to do with it --- what is at issue is whether there is certain
to be a match.  Since we do not have foreign-key enforcement on the
system catalog interrelationships, it is possible for system bugs or
manual intervention to create non-matching situations.

We have seen enough failures associated with "can't happen" missing
links that I think it's just folly to remove error tolerance like this.
I mean, there are *many* thousands of lines of code that we can remove
if the only criterion is readability and robustness means nothing...
who needs WAL for example?

            regards, tom lane

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Not to to confusing
Next
From: Simon Riggs
Date:
Subject: COPY Fillfactor patch