summaryrefslogtreecommitdiff
path: root/src/pl
diff options
context:
space:
mode:
authorItagaki Takahiro2011-02-01 06:21:32 +0000
committerItagaki Takahiro2011-02-01 06:21:32 +0000
commit0c707aa4583a5584f4c3f4ad1697bb206ed0d65a (patch)
tree6bcf18b701e62751bbde1f89f7af286b95c5c60f /src/pl
parent03282bfa8973f3a77ca3e7c14847a5a11d07d6a2 (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 3e40945e35d..b685841d971 100644
--- a/src/pl/plpgsql/src/pl_exec.c
+++ b/src/pl/plpgsql/src/pl_exec.c
@@ -3786,7 +3786,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);