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

Re: LEFT JOIN used in psql describe.c

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: LEFT JOIN used in psql describe.c
Date: 2005-04-02 04:46:41
Message-ID: 1070.1112417201@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
"Greg Sabino Mullane" <greg(at)turnstep(dot)com> writes:
>> Does anyone know why so many LEFT JOINs are used in psql/describe.c to
>> join to the pg_namespace table, like here:

> Yes, pg_relnamespace is definitely not null. I've actually already removed
> the left joins from my \df patch, since I had to rewrite some of the
> queries anyway. If this is wrong, please let me know of course!

I think the idea was to be certain to show every pg_proc entry (or other
catalog for other \d commands), no matter how badly broken the catalog
interrelationships might be.  If there's not an unarguable reason
for eliminating the left joins I'd be inclined to keep it like that.
What does an inner join buy here, other than brittleness?

(Yeah, I have the perspective of a developer who deals with broken
situations every day.  So?)

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2005-04-02 05:04:48
Subject: Re: [HACKERS] plPHP in core?
Previous:From: Marc G. FournierDate: 2005-04-02 04:43:25
Subject: Re: [HACKERS] plPHP in core?

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