Re: \d type queries - why not views in system catalog?!?

From: Greg Copeland <greg(at)CopelandConsulting(dot)Net>
To: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
Cc: greg(at)turnstep(dot)com, PostgresSQL Hackers Mailing List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: \d type queries - why not views in system catalog?!?
Date: 2003-01-13 20:56:22
Message-ID: 1042491381.32403.0.camel@mouse.copelandconsulting.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Oh!

That's an excellent idea. Seemingly addresses the issue and has
value-add. I'm not aware of any gotchas here. Is there something that
is being overlooked?

Greg

On Mon, 2003-01-13 at 14:50, Robert Treat wrote:
> On Mon, 2003-01-13 at 11:28, greg(at)turnstep(dot)com wrote:
> >
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> > NotDashEscaped: You need GnuPG to verify this message
> >
> >
> > > Wouldn't it be easier (and more portable, see 7.3/7.2 system catalogs vs.
> > > psql) to have views for that? Do I miss a point here?
> >
> > Putting the \d commands into views has been on the TODO list for a long time:
> > I think it is actually the only psql-related item left, until we change
> > the backend protocol to indicate transaction state. I don't think a view
> > would have helped with the psql 7.2/7.3 change: a lot more changed than
> > simply the underlying SQL.
> >
> > Some of the the backslash commands are not amenable to putting inside a
> > view, as they actually compromise multiple SQL calls and some logic in
> > the C code, but a few could probably be made into views. Could whomever
> > added that particular TODO item expand on this?
> >
>
> One idea I've always thought would be nice would be to make full fledged
> C functions out of the \ commands and ship them with the database. This
> way the \ commands could just be alias to "select myfunc()". This would
> help out all of us who write GUI interfaces since we would have standard
> functions we could call upon, and would also help with backward
> compatibility since \dv could always call select list_views(), which
> would already be included with each server. One of the reasons that this
> was not feasible in the past was that we needed functions that could
> return multiple rows and columns easily. Now that we have that in 7.3,
> it might be worth revisiting.
>
> Robert Treat
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
--
Greg Copeland <greg(at)copelandconsulting(dot)net>
Copeland Computer Consulting

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Page 2003-01-13 21:00:44 Re: \d type queries - why not views in system catalog?!?
Previous Message Robert Treat 2003-01-13 20:50:32 Re: \d type queries - why not views in system catalog?!?