Re: More schema support for psql

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: More schema support for psql
Date: 2002-06-24 23:32:25
Message-ID: 2159.1024961545@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

"Greg Sabino Mullane" <greg(at)turnstep(dot)com> writes:
> This version covers most everything, and includes support for some
> wildcard type matching of schemas and tables,

Like what? I don't much want to reverse-engineer your code to discover
what you think should happen ... and you don't seem to have included any
documentation patches.

In general I'd recommend posting a straw-man proposal for the behavior
before you go to the trouble of writing code. (I had solicited ideas
awhile back, but don't recall that we arrived at any consensus.)

> All references to pg_ tables are now fully qualified

Yeah, I've been wondering whether we shouldn't do that. It will break
psql's \d commands for use with pre-7.3 backends, but of course the
joins against pg_namespace will pretty much do that anyway. Does anyone
want to bite the bullet and make psql backend-version-aware, like
pg_dump is? It would be a lot more work and code bulk, so I'm not sure
it's worth the trouble, but ...

> Currently, it does
> temporary relations first (in other words, temporary schemas), then
> non-public schemas (in order of last creation date), then public schemas,
> and finally the system schemas.

Surely it should pay attention to the search path. I don't think that
\d should show relations that are outside the current path (unless a
qualified name pattern is given).

I wonder in fact whether we could avoid having so much of this logic on
the psql side, and rely more on the backend to do the searching. I'm
not saying that the available name lookup functions are adequate for
psql yet --- but it's not too late to improve them if needed.

regards, tom lane

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Kurt at iadvance 2002-06-25 00:08:54 Re: Some Solaris notes, and an invitation
Previous Message Tom Lane 2002-06-24 21:45:58 Re: show() function