Re: implicit lock in RULE ? - Mailing list pgsql-novice

From Tom Lane
Subject Re: implicit lock in RULE ?
Date
Msg-id 18677.1051390398@sss.pgh.pa.us
Whole thread Raw
In response to implicit lock in RULE ?  (Fritz Lehmann-Grube <lehmannf@math.TU-Berlin.DE>)
List pgsql-novice
Fritz Lehmann-Grube <fritzlg@gmx.de> writes:
>> You'd be better off doing this as a trigger, not a rule.  The syntax
>> hurdle is a bit higher (you need to learn a little bit of pl/pgsql)

> I know, but my "contract" tells me to produce code "as standard SQL as
> possible" (sorry. They think we might want to be able to port to oracle
> or something - though we can't, we're open source. See www.mumie.net or
> www.math.tu-berlin.de/multiverse )- TRIGGERS are, as much as RULES, but
> pl/pgsql is not. (Am I right ? I'd be glad to use more pl/pgsql)

I would think you'd have a better shot at porting triggers to Oracle
than rules.  pl/pgsql is a shameless imitation of Oracle's PL/SQL, so
that part is no problem.  There are syntactical differences in the way
you set up a trigger, but AFAIK the functionality is comparable.
On the other hand, I don't believe there is anything similar to PG's
rule system in any other DBMS.

            regards, tom lane


pgsql-novice by date:

Previous
From: Josh Berkus
Date:
Subject: Re: subselects?
Next
From: "Sumaira Ali -"
Date:
Subject: Postgresql Makefile