Oddity with psql \d and pg_table_is_visible

From: Decibel! <decibel(at)decibel(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Oddity with psql \d and pg_table_is_visible
Date: 2007-09-05 16:23:46
Message-ID: 20070905162345.GU38801@decibel.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I have a database where I'd created a copy of pg_class in public.
pgAdmin shows that the table exists, but \d doesn't. This is because of
how pg_table_is_visible works, specifically this comment:

/*
* If it is in the path, it might still not be visible; it could be
* hidden by another relation of the same name earlier in the path. So
* we must do a slow check for conflicting relations.
*/

While this is correct on a per-relation level, I'm thinking that it's
not what we'd really like to have happen in psql. What I'd like \d to do
is show me everything in any schema that's in my search_path, even if
there's something higher in the search_path that would over-ride it.
ISTM that's what most people would expect out of \d.

If no one objects I'll come up with a patch for this.
--
Decibel!, aka Jim Nasby decibel(at)decibel(dot)org
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2007-09-05 16:28:06 Re: Final background writer cleanup for 8.3
Previous Message Teodor Sigaev 2007-09-05 16:11:23 left outer join vs subplan