summaryrefslogtreecommitdiff
path: root/src/pl
diff options
context:
space:
mode:
authorItagaki Takahiro2011-02-01 06:21:32 +0000
committerItagaki Takahiro2011-02-01 06:23:55 +0000
commit9a012852897fec73ed1459486d6e8426c674d9ad (patch)
tree1177bd7350b6e1bf561823552ed1f4b2421d07b8 /src/pl
parent6bfa6b0867c370d72cbaeba18d6d3a5d80eae0e7 (diff)
Fix wrong error reports in 'number of array dimensions exceeds the
maximum allowed' messages, that have reported one-less dimensions. Alexey Klyukin
Diffstat (limited to 'src/pl')
-rw-r--r--src/pl/plpgsql/src/pl_exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c
index 16277ceaa0f..9d4f59ff6a2 100644
--- a/src/pl/plpgsql/src/pl_exec.c
+++ b/src/pl/plpgsql/src/pl_exec.c
@@ -3763,7 +3763,7 @@ exec_assign_value(PLpgSQL_execstate *estate,
ereport(ERROR,
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
errmsg("number of array dimensions (%d) exceeds the maximum allowed (%d)",
- nsubscripts, MAXDIM)));
+ nsubscripts + 1, MAXDIM)));
subscripts[nsubscripts++] = arrayelem->subscript;
target = estate->datums[arrayelem->arrayparentno];
} while (target->dtype == PLPGSQL_DTYPE_ARRAYELEM);