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 14452.1009570261@sss.pgh.pa.us
Whole thread Raw
In response to Re: 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?
List pgsql-general
Roland Roberts <roland@astrofoto.org> writes:
> DEBUG:  StartTransactionCommand
> DEBUG:  query: insert into exam (type, school_id, year, population, level) values ('ELA', 4, 1999, 'GE', '{
7,87,208,73}') 
> DEBUG:  ProcessQuery
> NOTICE:  plpgsql: ERROR during compile of exam_statistics_fixup near line 4
> ERROR:  parse error at or near "["
> DEBUG:  AbortCurrentTransaction

Okay, so it's not coming from a passed-down query.  I think my original
guess is right: plpgsql doesn't support assignment to array elements.

> Should I log this as a bug?

"Missing feature" would be more like it.  Postgres' array support is
pretty weak in a lot of places, not only plpgsql.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: postgres processes spending most of their time in the kernel
Next
From: Roland Roberts
Date:
Subject: Re: How to access array elements via PL/pgSQL trigger?