RESTORE query accepts
settings in its SETTINGS clause that control which categories of objects are read
from a backup. This page documents the settings that select what is restored: table
data, access entities, and user-defined functions.
structure_only
Type: Bool. Default: false.
When set to true, only CREATE queries are read from the backup, without the
contents of the restored objects. It is a convenient shortcut that sets the
effective defaults of all three category settings below to false:
restore_table_datarestore_access_entitiesrestore_functions
restore_table_data
Type: Bool. Optional; when not set it defaults to !structure_only (i.e. true
unless structure_only is set).
Whether to restore the data of tables. When set explicitly it overrides
structure_only: set it to true to restore table data even when
structure_only=true, or to false to skip table data even when structure_only
is not set.
restore_access_entities
Type: Bool. Optional; when not set it defaults to !structure_only.
Whether to restore access entities — users, roles, settings profiles, row policies,
and quotas. When set explicitly it overrides structure_only.
restore_functions
Type: Bool. Optional; when not set it defaults to !structure_only.
Whether to restore user-defined functions. When set explicitly it overrides
structure_only.
Effective behavior
Each category is restored when its corresponding setting istrue. When a category
setting is not specified, its value is derived from structure_only: all three are
true by default, and all three become false when structure_only=true.
This is fully backward compatible: a
RESTORE query that does not set any of the
new settings behaves exactly as before.