Received: from oscar.eng.cv.net (oscar.eng.cv.net [167.206.9.141]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fBG2Qdm62656 for ; Sat, 15 Dec 2001 21:26:39 -0500 (EST) (envelope-from marc@oscar.eng.cv.net) Received: (from marc@localhost) by oscar.eng.cv.net (8.11.4/8.11.3) id fBG2Pph62014 for pgsql-sql@postgresql.org; Sat, 15 Dec 2001 21:25:51 -0500 (EST) (envelope-from marc) Date: Sat, 15 Dec 2001 21:25:51 -0500 From: Marc Spitzer To: pgsql-sql@postgresql.org Subject: Re: should this be a trigger or a rule? Message-ID: <20011215212551.A61980@oscar.eng.cv.net> References: <11551.1008468260@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <11551.1008468260@sss.pgh.pa.us>; from tgl@sss.pgh.pa.us on Sat, Dec 15, 2001 at 09:04:20PM -0500 X-Archive-Number: 200112/160 X-Sequence-Number: 5983 On Sat, Dec 15, 2001 at 09:04:20PM -0500, Tom Lane wrote: > marc@oscar.eng.cv.net (Marc Spitzer) writes: > > I have 3 tables: pings, curr_state, ping_log and here is what I want > > to happen: > > when I insert a row into pings it checks to see if the ping was > > sucessful or not. > > Anything that's most naturally described as driven by insert (or update > or delete) of individual rows is best done as a trigger, IMHO. > > regards, tom lane Thanks, One last question, I am using Xemacs to auto format the code for me, I have discovered the sql-postgres but that is only in the postgres(psql) window not in the where I edit my code window. I get this in lisp by using M-x load-library then ilisp ams perl,tcl, C take care of them selves. Thanks again, marc