Re: BUG #18134: ROW_COUNT do not set to 0 when psql's \gset command get no rows returned
В списке pgsql-bugs по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: BUG #18134: ROW_COUNT do not set to 0 when psql's \gset command get no rows returned |
| Дата | |
| Msg-id | 1615012.1696121047@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: BUG #18134: ROW_COUNT do not set to 0 when psql's \gset command get no rows returned (Michael Paquier <michael@paquier.xyz>) |
| Ответы |
Re: BUG #18134: ROW_COUNT do not set to 0 when psql's \gset command get no rows returned
|
| Список | pgsql-bugs |
Michael Paquier <michael@paquier.xyz> writes:
> On Wed, Sep 27, 2023 at 06:00:58PM +0800, Japin Li wrote:
>> It seems SaveResultVariables() was lost when executing failed. Attached fix it.
> Yeah, I think that you're right here, the variables should be set.
> SetResultVariables() ought to be called even if \gset failed to return
> a result.
Agreed. The adjacent comment is now a lie though. Maybe just
- /* set variables on last result if all went well */
+ /* set variables from last result */
Bigger-picture question: should we back-patch this, or just fix it in
HEAD? It's wrong, but I'm not sure it's so obviously wrong that there
could not be somebody depending on the existing behavior.
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера