Roland Roberts <roland@astrofoto.org> writes:
> I have a (partial) schema as shown below. When I attempt to insert a
> row from a Tcl script, I get the following error from the script:
> NOTICE: plpgsql: ERROR during compile of exam_statistics_fixup near line 4
> ERROR: parse error at or near "["
Most likely this error is not coming from plpgsql, but from the core
SQL parser spitting up on some transformed query that plpgsql tried
to feed it. It'll be educational to set the debug level to 2 or more
(in a fresh backend) and retry the failing query. That should cause
the postmaster log to accumulate the queries being sent down to the
SQL parser.
My first thought is that plpgsql may not support the syntax
arrayvar[subscript] := something
but I've not tried it.
regards, tom lane