]> granicus.if.org Git - postgresql/commit
Support CONSTANT/NOT NULL/initial value for plpgsql composite variables.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 14 Feb 2018 03:15:08 +0000 (22:15 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 14 Feb 2018 03:15:08 +0000 (22:15 -0500)
commitf9263006d871d127794a402a7bef713fdd882156
tree67a455d0e2a3f9dc61bd4c19088bdfb435a21328
parentfd333bc763ea104f2a2c10c6b0061c996d4a2f5a
Support CONSTANT/NOT NULL/initial value for plpgsql composite variables.

These features were never implemented previously for composite or record
variables ... not that the documentation admitted it, so there's no doc
updates here.

This also fixes some issues concerning enforcing DOMAIN NOT NULL
constraints against plpgsql variables, although I'm not sure that
that topic is completely dealt with.

I created a new plpgsql test file for these features, and moved the
one relevant existing test case into that file.

Tom Lane, reviewed by Daniel Gustafsson

Discussion: https://postgr.es/m/18362.1514605650@sss.pgh.pa.us
src/pl/plpgsql/src/Makefile
src/pl/plpgsql/src/expected/plpgsql_varprops.out [new file with mode: 0644]
src/pl/plpgsql/src/pl_comp.c
src/pl/plpgsql/src/pl_exec.c
src/pl/plpgsql/src/pl_funcs.c
src/pl/plpgsql/src/pl_gram.y
src/pl/plpgsql/src/plpgsql.h
src/pl/plpgsql/src/sql/plpgsql_varprops.sql [new file with mode: 0644]
src/test/regress/expected/plpgsql.out
src/test/regress/sql/plpgsql.sql