Re: Views- Advantages and Disadvantages

From: Ilan Volow <listboy(at)clarux(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Views- Advantages and Disadvantages
Date: 2007-05-09 18:39:34
Message-ID: AB1BA32C-FE95-4ADD-BFF9-B3CE9379FF4E@clarux.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On May 9, 2007, at 4:36 AM, Ashish Karalkar wrote:

> Thanks All for your replies,
> But then dont we have any disadvantage of using View???
>
> With Reagrds
> Ashish...
>
>

I once inherited a database that made extensive use of constants in
views (a la magic numbers) as well as had several instances of
complex views referencing other complex views. The magic numbers made
it extremely difficult at first understand what was going on with the
entire application (both on server and client) because it appeared
that I was getting values out of thin air that were not coming from
any tables or the client. The views-referencing-other-views made
changing a view several layers up in the dependency hierarchy a real
PITA as I had to completely drop all the views and re-add them.

Views are powerful, but with great power comes great responsibility.
They can be very easily abused IMHO.

--
Ilan Volow
Implicit code is inherently evil, and here's the reason why:

In response to

Browse pgsql-general by date

  From Date Subject
Next Message PFC 2007-05-09 18:51:52 Re: In theory question
Previous Message Tom Lane 2007-05-09 18:36:01 Re: CentOS 5, pg8.4.2, could not read time zone file