Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iBadm-00031M-8N for pgsql-general@arkaria.postgresql.org; Sat, 21 Sep 2019 08:21:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iBadk-0005hj-7m for pgsql-general@arkaria.postgresql.org; Sat, 21 Sep 2019 08:21:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iBadj-0005hW-Ty for pgsql-general@lists.postgresql.org; Sat, 21 Sep 2019 08:21:11 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iBadh-0000Tp-Jh for pgsql-general@lists.postgresql.org; Sat, 21 Sep 2019 08:21:11 +0000 Received: from [192.168.127.1] (port=33296 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtp (Exim 4.88 (FreeBSD)) (envelope-from ) id 1iBadf-000CsV-3X; Sat, 21 Sep 2019 08:21:07 +0000 Received: from localhost ([127.0.0.1]:48061 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.92.1 (FreeBSD)) (envelope-from ) id 1iBade-0004Qn-Qb; Sat, 21 Sep 2019 08:21:06 +0000 From: Andrew Gierth To: Thiemo Kellner Cc: PostgreSQL General Subject: Re: Use of ?get diagnostics'? In-Reply-To: <20190921075700.Horde.7M0WmarMSSL6-CZvUSrg4Dg@webmail.gelassene-pferde.biz> (Thiemo Kellner's message of "Sat, 21 Sep 2019 07:57:00 +0000") Message-ID: <875zlmoyg5.fsf@news-spur.riddles.org.uk> References: <20190921075700.Horde.7M0WmarMSSL6-CZvUSrg4Dg@webmail.gelassene-pferde.biz> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (berkeley-unix) Date: Sat, 21 Sep 2019 09:21:06 +0100 MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk >>>>> "Thiemo" == Thiemo Kellner writes: Thiemo> Hi all Thiemo> I try to create a function (code at Thiemo> https://pastebin.com/mTs18B90) Paste sites are for IRC, on the mailing list you should always attach the necessary details to your message. Thiemo> using 'get diagnostics' to retrieve the number of affected Thiemo> rows. However, it throws Thiemo> the following exception was thrown: Thiemo> SQLSTATE: 42703 Thiemo> column "row_count" does not exist line 44 of your paste: V_TEXT := V_TEXT || ROW_COUNT || ' row.'; should be V_ROW_COUNT, I suspect. Likewise line 46. (The CONTEXT lines of the error message would have identified the offending line of the function for you.) -- Andrew (irc:RhodiumToad)