Re: Conditional updateable view

From: "Peter Childs" <peterachilds(at)gmail(dot)com>
To:
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Conditional updateable view
Date: 2007-12-21 13:36:36
Message-ID: a2de01dd0712210536g3f916da0t3b87c504159f46b6@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 16/12/2007, snacktime <snacktime(at)gmail(dot)com> wrote:
>
> I can't seem to find an example of how to add restrictions to the
> where clause of an updateable view created via the rule system. For
> example I don't want the update to complete if a where clause is
> missing entirely, and in some cases I want to only allow the update if
> the where clause specifies a particular column.
>
> Is there a way to do this?

Quick answer no.

Long answer. You can limit which fields can be updated and indeed rename
fields or update completely different tables using rules and/or triggers.
But you not can say that the where clause must include something.

Peter

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Smith 2007-12-21 13:37:40 Re: change owner to all object in a schema
Previous Message Andreas Kretschmer 2007-12-21 12:42:24 Re: change owner to all object in a schema