Received: from txino.mikasa.eh (130-ZARA-X10.libre.retevision.es [62.82.227.130]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f4N0CWA41170 for ; Tue, 22 May 2001 20:12:33 -0400 (EDT) (envelope-from txinete@wanadoo.es) Received: from txino.mikasa.eh (localhost.localdomain [127.0.0.1]) by txino.mikasa.eh (Postfix) with SMTP id E91F465539 for ; Wed, 23 May 2001 02:24:17 -0400 (EDT) Content-Type: text/plain; charset="iso-8859-1" From: "J.Fernando Moyano" Organization: SymeX To: pgsql-sql@postgresql.org Subject: implied rows when a rule gets executed. Date: Wed, 23 May 2001 02:24:17 -0400 X-Mailer: KMail [version 1.2] MIME-Version: 1.0 Message-Id: <01052302241703.01962@txino.mikasa.eh> Content-Transfer-Encoding: 8bit X-Archive-Number: 200105/245 X-Sequence-Number: 3073 -----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-----