Re: [GENERAL] ERROR: query returned no rows - Mailing list pgsql-general

From Alexander Farber
Subject Re: [GENERAL] ERROR: query returned no rows
Date
Msg-id CAADeyWiZ4QNKSVffrrXHv8-d_TvTJ-inBRdZh9JP87kKk8UzFg@mail.gmail.com
Whole thread Raw
In response to [GENERAL] ERROR: query returned no rows  (Alexander Farber <alexander.farber@gmail.com>)
Responses Re: [GENERAL] ERROR: query returned no rows
List pgsql-general
Hi again,

On Mon, Jun 26, 2017 at 8:21 PM, Alexander Farber <alexander.farber@gmail.com> wrote:

words=> select * from words_skip_game(1, 1);
ERROR:  query returned no rows
CONTEXT:  PL/pgSQL function words_skip_game(integer,integer) line 85 at SQL statement

When I look at my source code ( https://gist.github.com/afarber/cac9a83b7a37307ace8d787be9b8ff4c ) at the line 85, then I am not sure if the line number reported by the error message is correct


I have added many RAISE NOTICE 'xxxx' lines and now see that the error is at SELECT ... INTO STRICT.... (which was not the line 85):

                SELECT
                        _opponent,
                        fcm,
                        apns,
                        sns,
                        CASE
                                WHEN _skips = 5 THEN 'Противник пропускает ход (еще один пропуск завершит игру)'
                                ELSE 'Противник пропускает ход'
                        END
                FROM    words_users
                WHERE   uid = _opponent
                INTO STRICT
                        out_uid,
                        out_fcm,
                        out_apns,
                        out_sns,
                        out_note;
                RETURN NEXT;

Regards
Alex 

pgsql-general by date:

Previous
From: Alexander Farber
Date:
Subject: Re: [SPAM] [GENERAL] ERROR: query returned no rows
Next
From: Alexander Farber
Date:
Subject: Re: [GENERAL] ERROR: query returned no rows