Add relation option toast_value_type

This relation option gives the possibility to define the attribute type
that can be used for chunk_id in a TOAST table when it is initially
created.  An update of this parameter has no effect if a TOAST table
already exists under the relation, even on rewrites.  It cannot be set
for TOAST relations.

This new option can be set only to "oid" as of this commit.  This
feature is extracted as a patch of its own to ease the introduction of a
second mode in a follow-up change, related to the introduction of 8-byte
OIDs in external TOAST pointers.

Bump catalog version, as StdRdOptions has changed.

Author: Michael Paquier <[email protected]>
Reviewed-by: Greg Burd <[email protected]>
Reviewed-by: Bharath Rupireddy <[email protected]>
Reviewed-by: Yugo Nagata <[email protected]>
Discussion: https://postgr.es/m/[email protected]

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f33844889bb6950f9c207b9ea4830947f1e1f50e

Modified Files
--------------
doc/src/sgml/ref/create_table.sgml       | 26 ++++++++++++++++++++++++++
src/backend/access/common/reloptions.c   | 21 +++++++++++++++++++++
src/backend/catalog/toasting.c           | 16 ++++++++++++++++
src/bin/psql/tab-complete.in.c           |  1 +
src/include/catalog/catversion.h         |  2 +-
src/include/utils/rel.h                  | 17 +++++++++++++++++
src/test/regress/expected/reloptions.out | 22 ++++++++++++++++++++++
src/test/regress/sql/reloptions.sql      | 12 ++++++++++++
src/tools/pgindent/typedefs.list         |  1 +
9 files changed, 117 insertions(+), 1 deletion(-)

Reply via email to