Re: How to access array elements via PL/pgSQL trigger? - Mailing list pgsql-general

From Tom Lane
Subject Re: How to access array elements via PL/pgSQL trigger?
Date
Msg-id 28844.1009514609@sss.pgh.pa.us
Whole thread Raw
In response to How to access array elements via PL/pgSQL trigger?  (Roland Roberts <roland@astrofoto.org>)
Responses Re: How to access array elements via PL/pgSQL trigger?
Re: How to access array elements via PL/pgSQL trigger?
List pgsql-general
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

pgsql-general by date:

Previous
From: Roland Roberts
Date:
Subject: How to access array elements via PL/pgSQL trigger?
Next
From: Bruce Momjian
Date:
Subject: Re: Modifying table ownership