Re: Views, views, views! (long) - Mailing list pgsql-hackers

From Darren King
Subject Re: Views, views, views! (long)
Date
Msg-id 6E0907A94904D94B99D7F387E08C4F570597A4@FALCON.INSIGHT
Whole thread Raw
In response to Views, views, views! (long)  (Josh Berkus <josh@agliodbs.com>)
List 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


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Table Partitioning, Part 1
Next
From: "Magnus Hagander"
Date:
Subject: Re: Case insensitive usernames