| От | Marko Tiikkaja |
|---|---|
| Тема | Re: PL/PgSQL: stmt_fors and variable value after loop |
| Дата | |
| Msg-id | 54BD3AA3.1020107@joh.to обсуждение исходный текст |
| Ответ на | Re: PL/PgSQL: stmt_fors and variable value after loop (Marko Tiikkaja <marko@joh.to>) |
| Список | pgsql-docs |
FWIW, I went with this method: On 1/19/15 5:17 PM, I wrote: > 3) Use a count(*) OVER () inside the query and EXIT if that count is 1 I guess defining this behavior wouldn't be such a big win, since the approach I showed would only work if the loop body keeps a count of the number of iterations somewhere; FOR doesn't appear to be setting row_count. I'm having a hard time imagining actual use cases where the count doesn't matter but you'd like to look at the last values anyway. If you think there's any chance that this would prevent us from changing the implementation for the better in the future, I think we should just drop this issue. .marko -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs
В списке pgsql-docs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера