Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 7C7A74771DA for ; Thu, 23 Jan 2003 12:16:24 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id D116D476A06 for ; Thu, 23 Jan 2003 12:00:50 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id h0NH0q5u026611; Thu, 23 Jan 2003 12:00:52 -0500 (EST) To: "Tambet Matiisen" Cc: pgsql-sql@postgresql.org Subject: Re: calling function from rule In-reply-to: <81132473206F3A46A72BD6116E1A06AE1B14CC@black.aprote.com> References: <81132473206F3A46A72BD6116E1A06AE1B14CC@black.aprote.com> Comments: In-reply-to "Tambet Matiisen" message dated "Thu, 23 Jan 2003 17:55:39 +0200" Date: Thu, 23 Jan 2003 12:00:52 -0500 Message-ID: <26610.1043341252@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/362 X-Sequence-Number: 11227 "Tambet Matiisen" writes: >> Try 7.3, we changed the rules about returned records count. > I have 7.3. When rule and action are the same, everything works fine. > Doing an insert in update rule and opposite are OK too. Problem is, > when I do select in insert/update/delete rule. Then the result of > select is returned instead of command status, even if the select > is done in non-instead rule and there is unconditional instead rule. Oh, I think your complaint is really about the fact that psql doesn't print the command status if it got any tuples (or even just a tuple descriptor) in the result series. AFAICT the information returned by the backend is sensible in this situation: the "UPDATE 1" status message *is* returned and is available from PQcmdStatus. psql is just choosing not to print it. I'm not sure that that's wrong, though. regards, tom lane