Re: implicit lock in RULE ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: lehmannf(at)math(dot)tu-berlin(dot)de
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: implicit lock in RULE ?
Date: 2003-04-26 20:53:18
Message-ID: 18677.1051390398@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Fritz Lehmann-Grube <fritzlg(at)gmx(dot)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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Sumaira Ali - 2003-04-27 07:02:51 Postgresql Makefile
Previous Message Josh Berkus 2003-04-26 19:17:39 Re: subselects?