Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group