From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Rod Taylor" <rbt(at)barchord(dot)com> |
Cc: | "Alex Pilosov" <alex(at)pilosoft(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: New SQL Datatype RECURRINGCHAR |
Date: | 2001-07-08 04:47:07 |
Message-ID: | 6012.994567627@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"Rod Taylor" <rbt(at)barchord(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2001-07-08 07:47:45 | Re: [PATCH] Patch to make pg_hba.conf handle virtualhost access control and samehost keyword |
Previous Message | Rod Taylor | 2001-07-08 04:03:12 | Re: New SQL Datatype RECURRINGCHAR |