Re: Better localization of errors in plpgsql variable initialization

2021-10-29 Thread Pavel Stehule
pá 29. 10. 2021 v 20:00 odesílatel Tom Lane napsal: > While preparing commit a2a731d6c, I chanced to notice what seemed > like an off-by-one error in the line number reported for an error > occurring while we initialize a plpgsql variable. For instance > > regression=# do $$ declare x int := 1/0

Better localization of errors in plpgsql variable initialization

2021-10-29 Thread Tom Lane
While preparing commit a2a731d6c, I chanced to notice what seemed like an off-by-one error in the line number reported for an error occurring while we initialize a plpgsql variable. For instance regression=# do $$ declare x int := 1/0; regression$# begin end $$; ERROR: division by zero CONTEXT: