Re: New SQL Datatype RECURRINGCHAR - Mailing list pgsql-hackers

From Tom Lane
Subject Re: New SQL Datatype RECURRINGCHAR
Date
Msg-id 6012.994567627@sss.pgh.pa.us
Whole thread Raw
In response to Re: New SQL Datatype RECURRINGCHAR  ("Rod Taylor" <rbt@barchord.com>)
List pgsql-hackers
"Rod Taylor" <rbt@barchord.com> writes:
> Anyway, the point is that some of the simple views should be straight
> forward to reversing automatically if someone has the will and the
> time it can be done.  A while back a list of 'views which cannot be
> reversed' was created and included things such as Unions,
> Intersections, exclusions, aggregates, CASE statements, and a few more
> items.

SQL92 has a notion that certain simple views are "updatable", while the
rest are not.  In our terms this means that we should automatically
create ON INSERT/UPDATE/DELETE rules if the view is updatable according
to the spec.  I have not bothered to chase down all the exact details
of the spec's "updatableness" restrictions, but they're along the same
lines you mention --- only one referenced table, no aggregation, no
set operations, all view outputs are simple column references, etc.

My feeling is that the restrictions are stringent enough to eliminate
most of the interesting uses of views, and hence an automatic rule
creation feature is not nearly as useful/important as it appears at
first glance.  In real-world applications you'll have to expend some
thought on manual rule creation anyway.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Rod Taylor"
Date:
Subject: Re: New SQL Datatype RECURRINGCHAR
Next
From: Víctor Romero
Date:
Subject: Re: Pg on SMP half-powered