Skip site navigation (1) Skip section navigation (2)

Re: Updateable views...

From: Eric D Nielsen <nielsene(at)MIT(dot)EDU>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Eric D Nielsen <nielsene(at)MIT(dot)EDU>,PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, nielsene(at)MIT(dot)EDU
Subject: Re: Updateable views...
Date: 2003-03-05 14:48:48
Message-ID: 200303051448.JAA15033@cathedral-seven.mit.edu (view raw or flat)
Thread:
Lists: pgsql-hackers
> On Tue, 2003-03-04 at 15:26, Eric D Nielsen wrote:
> > The one place I haven't been able to use PostGreSQL to experiment is with
> > regards to updateable views.  I've found a few threads in -general and -hac
> kers
> > (including one linked from the ToDo list), but they all seem to die out wit
> hout
> > really reaching any sort of conclusion.  I've also seen that in many
> > cases it appears possible to use triggers/rules to simulate updateable view
> s,
> > but that feels like an inelegant solution to me.
> 
> How so? A view is defined by ON SELECT rules; it seems natural, then,
> that an updateable view would be defined ON INSERT / ON UPDATE rules.
> AFAIK the only deficiency with the status quo is that the system does
> not automatically define those insertion rules for you (in the subset of
> cases where rules actually *can* be defined: for example, the view can't
> include aggregation/grouping, calls to a user-defined function, etc.)

Using user-written rules seems inelegant to me because they force the user
to do something the DBMS should be able to do itself.  Should the rules be 
auto-generated by the DBMS then I wouldn't consider it inelegant.

> If you'd like to work on getting PostgreSQL to make views updateable
> automatically, that would be cool -- AFAIK no one else is currently
> working on it.
I'm definately willing to look into it, can anyone offer any advice for
getting "situated" in the code?  Are there paticular areas I should focus on
understanding/areas I should be able to safely ignore?  All my PostGreSQL 
experiences have been in user-land so far.  Is there a good place to view the
SQL99 standard without shelling out the $20 to ASNI?

I know I'll have more questions later, but until then, happy coding...

Eric

pgsql-hackers by date

Next:From: gregDate: 2003-03-05 14:51:17
Subject: Re: Error codes revisited
Previous:From: Bob CalcoDate: 2003-03-05 14:09:50
Subject: Re: XML ouput for psql

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group