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

From Roland Roberts
Subject Re: How to access array elements via PL/pgSQL trigger?
Date
Msg-id m2wuz7ud9r.fsf@kuiper.rlent.pnet
Whole thread Raw
In response to Re: How to access array elements via PL/pgSQL trigger?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:

    Tom> Most likely this error is not coming from plpgsql, but from
    Tom> the core SQL parser spitting up on some transformed query
    Tom> that plpgsql tried to feed it.  It'll be educational to set
    Tom> the debug level to 2 or more (in a fresh backend) and retry
    Tom> the failing query.  That should cause the postmaster log to
    Tom> accumulate the queries being sent down to the SQL parser.

I'll try bumping up the debug level tomorrow morning when I'm awake
enough to know what I'm doing....


    Tom> My first thought is that plpgsql may not support the syntax
    Tom>     arrayvar[subscript] := something
    Tom> but I've not tried it.

But line 4 (where it *says* the error is located) reads

    new.total := new.level[1] + ... ;

(which might be a variation of the same thing).

roland
--
               PGP Key ID: 66 BC 3B CD
Roland B. Roberts, PhD                             RL Enterprises
roland@rlenter.com                     76-15 113th Street, Apt 3B
roland@astrofoto.org                       Forest Hills, NY 11375

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Modifying table ownership
Next
From: Joe Conway
Date:
Subject: Re: First decent PostgreSQL CBT now on techdocs.postgresql.org