Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 9035C9FB59E for ; Sat, 7 Apr 2007 14:51:10 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 92416-10 for ; Sat, 7 Apr 2007 14:50:59 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by postgresql.org (Postfix) with ESMTP id C35CF9FB295 for ; Sat, 7 Apr 2007 14:51:06 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.8/8.13.8) with ESMTP id l37Hp1sm011977 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 7 Apr 2007 11:51:04 -0600 (MDT) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.8/8.13.8) with ESMTP id l37Hp1ls080092; Sat, 7 Apr 2007 11:51:01 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.8/8.13.8/Submit) id l37Hp0IS080091; Sat, 7 Apr 2007 11:51:00 -0600 (MDT) (envelope-from mfuhr) Date: Sat, 7 Apr 2007 11:51:00 -0600 From: Michael Fuhr To: Karthikeyan Sundaram Cc: postgres sql Subject: Re: rowcount function in postgres??? Message-ID: <20070407175100.GA80042@winnie.fuhr.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/90 X-Sequence-Number: 28090 On Sat, Apr 07, 2007 at 10:33:19AM -0700, Karthikeyan Sundaram wrote: > I am using 8.1.0 postgres and trying to write a plpgsql block. 8.1.8 is the latest version in that branch. Read the Release Notes for each minor release to see what bug fixes you're missing. http://www.postgresql.org/docs/8.1/interactive/release.html > In that I am inserting a row. I want to check to see if the row > has been inserted or not. See "Obtaining the Result Status" and "Trapping Errors" in the PL/pgSQL documentation. http://www.postgresql.org/docs/8.1/interactive/plpgsql-statements.html#PLPGSQL-STATEMENTS-DIAGNOSTICS http://www.postgresql.org/docs/8.1/interactive/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING -- Michael Fuhr