Re: arrays and functions in plpgsql - Mailing list pgsql-novice

From Tom Lane
Subject Re: arrays and functions in plpgsql
Date
Msg-id 26819.1095466248@sss.pgh.pa.us
Whole thread Raw
In response to Re: arrays and functions in plpgsql  (Todd Kover <kovert@omniscient.com>)
Responses Re: arrays and functions in plpgsql
List pgsql-novice
Todd Kover <kovert@omniscient.com> writes:
>         v_state[3] float8;

Hmm.  I'm not sure what the plpgsql parser will make of that.  I think
you probably wanted
          v_state float8[3];

(note that you really want [4], not that it actually matters since PG
doesn't enforce the array size; float8[] would do as well)

Also, I think you need to change v_state to v_old_state in several more
places than you did, or else assign v_old_state to v_state up front.

            regards, tom lane

pgsql-novice by date:

Previous
From: Todd Kover
Date:
Subject: Re: arrays and functions in plpgsql
Next
From: Todd Kover
Date:
Subject: Re: arrays and functions in plpgsql