Re: Use of ?get diagnostics'? - Mailing list pgsql-general

From Andrew Gierth
Subject Re: Use of ?get diagnostics'?
Date
Msg-id 875zlmoyg5.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Use of ?get diagnostics'?  (Thiemo Kellner <thiemo@gelassene-pferde.biz>)
Responses Re: Use of ?get diagnostics'?
List pgsql-general
>>>>> "Thiemo" == Thiemo Kellner <thiemo@gelassene-pferde.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)



pgsql-general by date:

Previous
From: Thiemo Kellner
Date:
Subject: Use of ?get diagnostics'?
Next
From: Arup Rakshit
Date:
Subject: Extend inner join to fetch not yet connected rows also