Re: Views, views, views! (long)

From: "Darren King" <DarrenK(at)Routescape(dot)com>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Views, views, views! (long)
Date: 2005-05-09 21:12:07
Message-ID: 6E0907A94904D94B99D7F387E08C4F570597A4@FALCON.INSIGHT
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Friday the 6th of May 2005, Mr. Treat opined:

> I also don't think it is any harder to learn to query the
> system tables than it would be to learn to query these new
> views (with a few caevets that I will come back to) and it
> might actually be better.

Admin tools are in a sense already a gui "view" into the database, so
whether they elect to use these new views seems rather immaterial to
this discussion, to me at least.

The more important aspect to me is as a user. As someone last week
pointed out (but it seems to have been lost in the tool discussion) is
that these views give the user easy access to system information from
the command line. This is where typing a multi-join querey against the
system catalog is error-prone and a PITA.

An even bigger point is that these views can be used in scripts or
procedures where the results can be used in another query or put into a
table. The '\d' command might show me a list of tables, but I for one
find the Oracle-style views such as ALL_TABLES, etc. more useful.

I've always found the slash-style commands to be basically useful in
showing what's there but using them to build reports or extract data for
use in other queries is painful compared to having queriable views of
the same data.

Darren

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2005-05-09 21:17:45 Re: Case insensitive usernames
Previous Message Simon Riggs 2005-05-09 21:02:53 Table Partitioning, Part 1