]> granicus.if.org Git - postgresql/commit
Generated columns
authorPeter Eisentraut <peter@eisentraut.org>
Sat, 30 Mar 2019 07:13:09 +0000 (08:13 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Sat, 30 Mar 2019 07:15:57 +0000 (08:15 +0100)
commitfc22b6623b6b3bab3cb057ccd282c2bfad1a0b30
treecda5092955ece5d547d5517ed56a3d480f199d25
parent6b8b5364ddd0e4d882562615c6b6c28638ade9f2
Generated columns

This is an SQL-standard feature that allows creating columns that are
computed from expressions rather than assigned, similar to a view or
materialized view but on a column basis.

This implements one kind of generated column: stored (computed on
write).  Another kind, virtual (computed on read), is planned for the
future, and some room is left for it.

Reviewed-by: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Pavel Stehule <pavel.stehule@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/b151f851-4019-bdb1-699e-ebab07d2f40a@2ndquadrant.com
84 files changed:
contrib/postgres_fdw/expected/postgres_fdw.out
contrib/postgres_fdw/postgres_fdw.c
contrib/postgres_fdw/sql/postgres_fdw.sql
doc/src/sgml/catalogs.sgml
doc/src/sgml/ddl.sgml
doc/src/sgml/information_schema.sgml
doc/src/sgml/protocol.sgml
doc/src/sgml/ref/copy.sgml
doc/src/sgml/ref/create_foreign_table.sgml
doc/src/sgml/ref/create_table.sgml
doc/src/sgml/ref/create_trigger.sgml
doc/src/sgml/textsearch.sgml
doc/src/sgml/trigger.sgml
src/backend/access/common/tupdesc.c
src/backend/catalog/heap.c
src/backend/catalog/information_schema.sql
src/backend/commands/copy.c
src/backend/commands/tablecmds.c
src/backend/commands/trigger.c
src/backend/commands/typecmds.c
src/backend/executor/execMain.c
src/backend/executor/execReplication.c
src/backend/executor/nodeModifyTable.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/outfuncs.c
src/backend/nodes/readfuncs.c
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/util/inherit.c
src/backend/optimizer/util/plancat.c
src/backend/parser/analyze.c
src/backend/parser/gram.y
src/backend/parser/parse_agg.c
src/backend/parser/parse_expr.c
src/backend/parser/parse_func.c
src/backend/parser/parse_relation.c
src/backend/parser/parse_utilcmd.c
src/backend/replication/logical/proto.c
src/backend/replication/logical/relation.c
src/backend/replication/logical/tablesync.c
src/backend/replication/logical/worker.c
src/backend/replication/pgoutput/pgoutput.c
src/backend/rewrite/rewriteHandler.c
src/backend/utils/cache/lsyscache.c
src/backend/utils/cache/partcache.c
src/backend/utils/cache/relcache.c
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump.h
src/bin/pg_dump/pg_dump_sort.c
src/bin/pg_dump/t/002_pg_dump.pl
src/bin/psql/describe.c
src/include/access/tupdesc.h
src/include/catalog/catversion.h
src/include/catalog/heap.h
src/include/catalog/pg_attribute.h
src/include/catalog/pg_class.dat
src/include/executor/nodeModifyTable.h
src/include/nodes/execnodes.h
src/include/nodes/parsenodes.h
src/include/optimizer/plancat.h
src/include/parser/kwlist.h
src/include/parser/parse_node.h
src/include/utils/lsyscache.h
src/pl/plperl/expected/plperl_trigger.out
src/pl/plperl/plperl.c
src/pl/plperl/sql/plperl_trigger.sql
src/pl/plpgsql/src/pl_exec.c
src/pl/plpython/expected/plpython_trigger.out
src/pl/plpython/plpy_cursorobject.c
src/pl/plpython/plpy_exec.c
src/pl/plpython/plpy_spi.c
src/pl/plpython/plpy_typeio.c
src/pl/plpython/plpy_typeio.h
src/pl/plpython/sql/plpython_trigger.sql
src/pl/tcl/expected/pltcl_trigger.out
src/pl/tcl/pltcl.c
src/pl/tcl/sql/pltcl_trigger.sql
src/test/regress/expected/create_table_like.out
src/test/regress/expected/generated.out [new file with mode: 0644]
src/test/regress/parallel_schedule
src/test/regress/serial_schedule
src/test/regress/sql/create_table_like.sql
src/test/regress/sql/generated.sql [new file with mode: 0644]
src/test/subscription/t/011_generated.pl [new file with mode: 0644]