Thread: pgsql: Fix plpgsql to pass only one copy of any given plpgsql variable
pgsql: Fix plpgsql to pass only one copy of any given plpgsql variable
From
tgl@postgresql.org (Tom Lane)
Date:
Log Message: ----------- Fix plpgsql to pass only one copy of any given plpgsql variable into a SQL command or expression, rather than one copy for each textual occurrence as it did before. This might result in some small performance improvement, but the compelling reason to do it is that not doing so can result in unexpected grouping failures because the main SQL parser won't see different parameter numbers as equivalent. Add a regression test for the failure case. Per report from Robert Davidson. Modified Files: -------------- pgsql/src/pl/plpgsql/src: gram.y (r1.87 -> r1.88) (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/gram.y.diff?r1=1.87&r2=1.88) pgsql/src/test/regress/expected: plpgsql.out (r1.44 -> r1.45) (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/plpgsql.out.diff?r1=1.44&r2=1.45) pgsql/src/test/regress/sql: plpgsql.sql (r1.37 -> r1.38) (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/plpgsql.sql.diff?r1=1.37&r2=1.38)