Skip site navigation (1) Skip section navigation (2)

Re: How to access array elements via PL/pgSQL trigger?

From: Roland Roberts <roland(at)astrofoto(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to access array elements via PL/pgSQL trigger?
Date: 2001-12-28 05:25:36
Message-ID: m2wuz7ud9r.fsf@kuiper.rlent.pnet (view raw or flat)
Thread:
Lists: pgsql-general
>>>>> "Tom" == Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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(at)rlenter(dot)com                     76-15 113th Street, Apt 3B
roland(at)astrofoto(dot)org                       Forest Hills, NY 11375

In response to

pgsql-general by date

Next:From: Joe ConwayDate: 2001-12-28 06:45:32
Subject: Re: First decent PostgreSQL CBT now on techdocs.postgresql.org
Previous:From: Bruce MomjianDate: 2001-12-28 05:08:59
Subject: Re: Modifying table ownership

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group