Re: Error message with plpgsql CONTINUE
От | Jim Nasby |
---|---|
Тема | Re: Error message with plpgsql CONTINUE |
Дата | |
Msg-id | 55D23A1D.2080506@BlueTreble.com обсуждение исходный текст |
Ответ на | Re: Error message with plpgsql CONTINUE (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Error message with plpgsql CONTINUE
|
Список | pgsql-hackers |
On 8/17/15 9:48 AM, Tom Lane wrote: > I'm inclined to think that if we wanted to make this better, the way to > improve it would be to detect the error*at compile time*, and get rid of > this hack in plpgsql_exec_function altogether. pl_gram.y already > successfully detects cases where CONTINUE mentions a label that doesn't > exist or isn't surrounding the CONTINUE. What it is missing is that we > don't distinguish labels on loops from labels on non-loop statements, and > thus it can't tell if CONTINUE is referencing a non-loop label or has no > label but is not inside any loop-type statement. Seems like that detail > could be added to the PLpgSQL_nsitem data structure without a huge amount > of work. So split PLPGSQL_NSTYPE_LABEL into PLPGSQL_NSTYPE_BLOCK_LABEL and PLPGSQL_NSTYPE_LOOP_LABEL, and split opt_block_label and opt_label the same way? -- Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX Data in Trouble? Get it in Treble! http://BlueTreble.com
В списке pgsql-hackers по дате отправления: