Re: Use of ?get diagnostics'?

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Thiemo Kellner <thiemo(at)gelassene-pferde(dot)biz>
Cc: PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Use of ?get diagnostics'?
Date: 2019-09-21 08:21:06
Message-ID: 875zlmoyg5.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>>>>> "Thiemo" == Thiemo Kellner <thiemo(at)gelassene-pferde(dot)biz> 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)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Arup Rakshit 2019-09-22 11:21:46 Extend inner join to fetch not yet connected rows also
Previous Message Thiemo Kellner 2019-09-21 07:57:00 Use of ?get diagnostics'?