pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: J.Fernando Moyano <txinete@wanadoo.es>
To: pgsql-sql@postgresql.org
Subject: implied rows when a rule gets executed.
Date: Wed, 23 May 2001 02:24:17 -0400
Message-ID: <01052302241703.01962@txino.mikasa.eh> (raw)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


In a rule... is there some way of getting the number of rows updated by the 
query that activates this rule ??

Martín Marqués says:

>You'll have to do more advance programing there. See if count(*) can help 
>you 
>in any way.
>I see you have to update usadas=(usadas-1). Try something like:
>
>usadas=(usadas-(select count(*) from piezas WHERE condition_delete) )


... but, how can i know "condition_delete" ???

If there is no way ... i will try with triggers ... but i think it's little 
simetrical .....  ==> i can get done my stuff with rules when inserting, but 
it isn't possible when deleting ???

Thanks .....

- -- 
Fernando Moyano

Frase del día:
- --------------
Fuerza tu OS/2 a OS/4!!.

(*) SymeX ==> http://symex.lantik.com
(*) WDBIL ==> http://wdbil.sourceforge.net
(*) Informate sobre LINUX en http://www.linux.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7C1eRoZaf9MvtDvcRAuqCAJ97HFg61+yJnRgn/Ulkd++paWTWRACfVBXQ
RslGvE5sh1IBYO1s4P36nXo=
=Tlk4
-----END PGP SIGNATURE-----



Message-ID: <01052302241703.01962@txino.mikasa.eh>
Permalink:  ../01052302241703.01962@txino.mikasa.eh/
Also on:    postgresql.org/message-id/01052302241703.01962@txino.mikasa.eh

 · 

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: txinete@wanadoo.es
  Subject: Re: implied rows when a rule gets executed.
  In-Reply-To: <01052302241703.01962@txino.mikasa.eh>

* 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