Joe Conway wrote:
> However, I'm now seeing this:
> [root@jec-linux pgsql]# cd /opt/src/pgsql/src/pl/plpgsql/src
> [root@jec-linux src]# bison -y -d gram.y
> NONE:0: /usr/bin/m4: ERROR: EOF in string
>
> Is this a "latest bison" kind of issue? I'm using version 1.75.
>
bison version seems to be the case. I updated to bison 1.875 and now
everything works perfectly.
BTW, this change together with the array expression stuff I just sent in
works well together:
CREATE OR REPLACE FUNCTION test1(integer[]) RETURNS float[] AS '
DECLARE
pa_dsid ALIAS FOR $1;
l_rv float[];
BEGIN
-- initialize a 5 element return array
l_rv := array[0,0,0,0,0];
FOR aoffset IN 1 .. 5 LOOP
l_rv[aoffset]:=pa_dsid[aoffset] * 1.33;
END LOOP;
RETURN l_rv;
END;
' language 'plpgsql';
regression=# select test1(array[1,2,3,4,5]);
test1
----------------------------
{1.33,2.66,3.99,5.32,6.65}
(1 row)
Joe