Re: Insert Updates Deletes on Views; Triggers on System Tables - Mailing list pgsql-general

From Doug McNaught
Subject Re: Insert Updates Deletes on Views; Triggers on System Tables
Date
Msg-id m3d6gfiixk.fsf@varsoon.wireboard.com
Whole thread Raw
In response to Insert Updates Deletes on Views; Triggers on System Tables  (Raymond <support@bigriverinfotech.com>)
Responses Re: Insert Updates Deletes on Views; Triggers on System Tables
List pgsql-general
Raymond <support@bigriverinfotech.com> writes:

> New to Postgres so please excuse my ignorance.
>
> 1) Are inserts, updates and deletes on views permissible?

Only using rules (which you say you can't do).

> 2) Can triggers be applied to system tables ( pg_group)?

Nope, not currently.

> The reason for 2) is that each user MUST belong to ONLY one of six groups So I
> believe a before-trigger is required to enforce this rule. And speaking of
> rules, cannot utilize the Postgres rules system (presume similiar to Apache
> rewrite engine) as database MUST remain very "traditional Oracle"  centric;
> hence the functions, triggers, etc.

I don't see the point of this--obviously your function definitions,
DDL etc will require a slightly different syntax for the PG database,
so why not add rules in if you want updatable views?  I don't think
you'll be able to use the same DDL in both DBs if you're doing
anything even slightly complicated, so...

User code shouldn't see any differences between updatable views in the
two systems, AFAIK.

-Doug

pgsql-general by date:

Previous
From: weigelt@metux.de
Date:
Subject: Re: [pgsql-advocacy] MySQL gets $19.5 MM
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] PG crash on simple query, story continues