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

From Dave Page
Subject Re: Views, views, views! (long)
Date
Msg-id E7F85A1B5FF8D44C8A1AF6885BC9A0E490DB3F@ratbert.vale-housing.co.uk
Whole thread Raw
In response to Views, views, views! (long)  (Josh Berkus <josh@agliodbs.com>)
Responses Re: Views, views, views! (long)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi Josh,

> -----Original Message-----
> From: pgsql-hackers-owner@postgresql.org
> [mailto:pgsql-hackers-owner@postgresql.org] On Behalf Of Josh Berkus
> Sent: 05 May 2005 05:38
> To: PostgreSQL-development
> Subject: [HACKERS] Views, views, views! (long)
>
> This
> has kept the pgAdmin and phpPgAdmin teams busy since 7.2, and
> means that GUI
> tools which fall out of maintenance (like Xpg) soon stop
> working.  This is
> easily remedied through a set of system views which will
> remain consistent
> regardless of changes in the underlying system tables.

6.3/6.4 for pgAdmin. 7.2 is positively recent :-)

However, I cannot see us using these views for a couple of reasons:

1) Users may drop or change them, something they cannot do easily with system catalogs. Yes, I know this is then their
fault,but it will stop admin tools that use the views from working even though the database itself is actually OK. If a
userdoes manage to alter a system catalog, they are far more likely to see breakage in other places as well. 

2) Catalog changes are infrequent but significant in other areas when they do occur. Consider the 7.2 -> 7.3 namespace
changes.Regardless of using views or the catalogs we still have significant work to do to support namespaces. Other
smallerchanges will likely require GUI updates or internal code changes that will also be necessary whether using views
orthe catalogs.  

3) One example of a catalog change that has caused a number of bug reports for us is the removal of
pg_database.datpath.Whilst your views could have prevented the error itself, we would still have had to modify pgAdmin
toprevent it displaying the path on newer servers as it is completely meaningless - however, do you proprose that your
viewswould have retained this column forever? If so, it seems they could get very messy, and cluttered with notes in
thedocs telling users that a given column was only relevant up till version X. 

After 8 or so years of dealing with problem, I'm really don't think we would gain anything worthwhile from the views
youpropose. However, I'm sure some end users may well find them useful, so I do not believe your work is in vain. 

Regards, Dave.


pgsql-hackers by date:

Previous
From: Joe Conway
Date:
Subject: Re: [pgsql-advocacy] Increased company involvement
Next
From: Oleg Bartunov
Date:
Subject: Re: Views, views, views! (long)