git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: da07a1e) | patch
Improve pl/pgsql to support composite-type expressions in RETURN.
Fri, 7 Dec 2012 04:09:52 +0000 (23:09 -0500)
Fri, 7 Dec 2012 04:09:52 +0000 (23:09 -0500)
commit 31a891857a128828d47d93c63e041f3b69cbab70
Improve pl/pgsql to support composite-type expressions in RETURN.

For some reason lost in the mists of prehistory, RETURN was only coded to
allow a simple reference to a composite variable when the function's return
type is composite. Allow an expression instead, while preserving the
efficiency of the original code path in the case where the expression is
indeed just a composite variable's name. Likewise for RETURN NEXT.

As is true in various other places, the supplied expression must yield
exactly the number and data types of the required columns. There was some
discussion of relaxing that for pl/pgsql, but no consensus yet, so this
patch doesn't address that.

Asif Rehman, reviewed by Pavel Stehule
doc/src/sgml/plpgsql.sgml diff | blob | blame | history
src/pl/plpgsql/src/pl_exec.c diff | blob | blame | history
src/pl/plpgsql/src/pl_gram.y diff | blob | blame | history
src/pl/plpgsql/src/pl_scanner.c diff | blob | blame | history
src/pl/plpgsql/src/plpgsql.h diff | blob | blame | history
src/test/regress/expected/plpgsql.out diff | blob | blame | history
src/test/regress/sql/plpgsql.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /