Re: improve FOUND in PL/PgSQL
От | Tom Lane |
---|---|
Тема | Re: improve FOUND in PL/PgSQL |
Дата | |
Msg-id | 17348.1029366634@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: improve FOUND in PL/PgSQL (Neil Conway <nconway@klamath.dyndns.org>) |
Ответы |
Re: improve FOUND in PL/PgSQL
|
Список | pgsql-patches |
Neil Conway <nconway@klamath.dyndns.org> writes: >> I think you could do this >> much more cleanly by introducing a local boolean: > Ah, ok -- thanks for the suggestion. It required a fair amount of > work, since I had to refactor a lot of the logic in the 3 functions > that handle PL/PgSQL FOR loops. Then you're still doing it the hard way: all you need is to do exec_set_found(found) immediately before anyplace that's going to return. You don't need to move the returns. Perhaps the refactoring is worth doing anyway, if it improves the readability of the code; but if it makes it worse then there's no need. It's hard to tell about this just from looking at the diff --- what do you feel about what you did? regards, tom lane
В списке pgsql-patches по дате отправления: