pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Martín Marqués <martin@bugs.unl.edu.ar>
To: pgsql-sql@postgresql.org
Subject: rules
Date: Thu, 26 Apr 2001 17:21:48 +0300
Message-ID: <01042617214801.04659@bugs> (raw)

Is it posible to make a rule execute more then one query?

Something like:

CREATE RULE rule_name AS ON INSERT TO table1
DO INSTEAD
INSERT INTO table2 VALUES
(new.value1,new.value2)
INSERT INTO table3 VALUES
(x,y)

If not, is there a way to do this? Triggers maybe?

Saludos... :-)

-- 
El mejor sistema operativo es aquel que te da de comer.
Cuida tu dieta.
-----------------------------------------------------------------
Martin Marques                  |        mmarques@unl.edu.ar
Programador, Administrador      |       Centro de Telematica
                       Universidad Nacional
                            del Litoral
-----------------------------------------------------------------



view thread (22+ messages)  latest in thread

Message-ID: <01042617214801.04659@bugs>
Permalink:  ../01042617214801.04659@bugs/
Also on:    postgresql.org/message-id/01042617214801.04659@bugs

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: martin@bugs.unl.edu.ar
  Subject: Re: rules
  In-Reply-To: <01042617214801.04659@bugs>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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