Search Postgresql Archives

Re: Why does an ON SELECT rule have to be named "_RETURN"?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 16, 2006 at 07:28:20AM -0500, Robert Treat wrote:
> On Monday 13 February 2006 01:49, Peter Eisentraut wrote:
> > First of all, it isn't all that hard to figure out whether a view is
> > probably updatable (the presence of the respective rules would be a
> > strong hint).  And second, if it's not, you get a fine error message
> > and can move on.  So there is really no good reason for client tools to
> > prevent you from using data entry forms on views.
> 
> One problem is the only way for a client tool to work generically in provding 
> data entry forms would be to provide entry for all columns, which would break 
> in all but the most trivial of cases.  Last time we discussed this for 
> phppgadmin, the general opinion was it wasn't worth trying to work around 
> postgresql core's deficiency. Once the core postgresql server supports 
> updatable views in proper, I'd imagine this would get done. 

True, but the client should allow it (possibly with a warning). Not
allowing people to generate forms on a view just because it may not be
updatable seems silly... There's plenty of info on how to create
updatable views on PostgreSQL, allowing users to indicate themselves
which fields are updatable seems better than trying to guess from the
database.

In the general case, if there are any INSERT/UPDATE/DELETE RULEs on a
view, there is no way for the client to determine what the effect will
be except in the simplest of cases, letting the user specify seems the
best bet.

Have a nice day,
-- 
Martijn van Oosterhout   <kleptog@xxxxxxxxx>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment: signature.asc
Description: Digital signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux