pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedRULES - Difference between DO and DO INSTEAD
2+ messages / 2 participants
[nested] [flat]
* RULES - Difference between DO and DO INSTEAD
@ 2002-02-05 11:26 Luis Sousa <llsousa@ualg.pt>
0 siblings, 1 reply; 2+ messages in thread
From: Luis Sousa @ 2002-02-05 11:26 UTC (permalink / raw)
To: pgsql-sql
Hello everybody
I'm building some rules for some views that I have, but I did'nt
understand yet what's the difference between doing a rule with DO or
with DO INSTEAD.
What's the diference ?
Thanks, Luis Sousa
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: RULES - Difference between DO and DO INSTEAD
@ 2002-02-05 18:20 Josh Berkus <josh@agliodbs.com>
parent: Luis Sousa <llsousa@ualg.pt>
0 siblings, 0 replies; 2+ messages in thread
From: Josh Berkus @ 2002-02-05 18:20 UTC (permalink / raw)
To: Luis Sousa <llsousa@ualg.pt>; pgsql-sql
Luis,
> I'm building some rules for some views that I have, but I did'nt
> understand yet what's the difference between doing a rule with DO or
> with DO INSTEAD.
> What's the diference ?
Simple:
CREATE RULE xxx ON UPDATE TO yyy WHERE www=zzz ...
DO ACTION: do the action, then go ahead and update the table.
DO INSTEAD ACTION: do the action, and *do not* update the table.
IMHO, the online docs on Rules and Triggers are quite good. However,
they are scattered around the online documentation; some is in SQL
Commands, some in Programmer's Guide. Put in some effort into finding
all the articles, it's worth it.
-Josh Berkus
______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh@agliodbs.com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2002-02-05 18:20 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-02-05 11:26 RULES - Difference between DO and DO INSTEAD Luis Sousa <llsousa@ualg.pt>
2002-02-05 18:20 ` Josh Berkus <josh@agliodbs.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox