{"kind": "relopts", "major": "18", "item": {"slug": "view-check-option", "name": "check_option", "name_zh": "check_option", "category": "View options", "summary": "This parameter may be either local or cascaded , and is equivalent to specifying WITH [ CASCADED | LOCAL ] CHECK OPTION (see below).", "aliases": ["view.check_option"], "versions": {"10": {"facts": [{"label": "Applies to", "value": "View options"}, {"label": "Value type", "value": "string"}, {"label": "Values", "value": "local, cascaded"}], "related": [{"url": "/docs/sql/create-view/?v=10", "label": "CREATE VIEW"}], "release": {"ref": "Local English manual 10.23", "label": "10.23", "major": "10", "channel": "historical", "revision": "4ff6f6193d91bf44fc701f657cc3295850bf786e42eafbfeed9f4879c3522613"}, "sources": [{"url": "/docs/10/sql-createview.html", "path": "sql-createview.html", "label": "PostgreSQL 10 English manual", "sha256": "f3beb72fc3c516331a0c0535d13aa59329eb7fdc265b20945dc7a37b97cfed4a"}], "sections": [{"title": "View options", "paragraphs": ["Views do not store query results. Set these security or update semantics with CREATE VIEW WITH or ALTER VIEW."]}, {"title": "Write checks", "paragraphs": ["This option controls the behavior of automatically updatable views. When this option is specified, INSERT and UPDATE commands on the view will be checked to ensure that new rows satisfy the view-defining condition (that is, the new rows are checked to ensure that they are visible through the view). If they are not, the update will be rejected. If the CHECK OPTION is not specified, INSERT and UPDATE commands on the view are allowed to create rows that are not visible through the view. The following check options are supported:", "LOCAL", "New rows are only checked against the conditions defined directly in the view itself. Any conditions defined on underlying base views are not checked (unless they also specify the CHECK OPTION ).", "CASCADED", "New rows are checked against the conditions of the view and all underlying base views. If the CHECK OPTION is specified, and neither LOCAL nor CASCADED is specified, then CASCADED is assumed.", "The CHECK OPTION may not be used with RECURSIVE views.", "Note that the CHECK OPTION is only supported on views that are automatically updatable, and do not have INSTEAD OF triggers or INSTEAD rules. If an automatically updatable view is defined on top of a base view that has INSTEAD OF triggers, then the LOCAL CHECK OPTION may be used to check the conditions on the automatically updatable view, but the conditions on the base view with INSTEAD OF triggers will not be checked (a cascaded check option will not cascade down to a trigger-updatable view, and any check options defined directly on a trigger-updatable view will be ignored). If the view or any of its base relations has an INSTEAD rule that causes the INSERT or UPDATE command to be rewritten, then all check options will be ignored in the rewritten query, including any checks from automatically updatable views defined on top of the relation with the INSTEAD rule."]}], "signature": "WITH (check_option = value)", "description": ["This parameter may be either local or cascaded , and is equivalent to specifying WITH [ CASCADED | LOCAL ] CHECK OPTION (see below). This option can be changed on existing views using ALTER VIEW ."]}, "11": {"facts": [{"label": "Applies to", "value": "View options"}, {"label": "Value type", "value": "string"}, {"label": "Values", "value": "local, cascaded"}], "related": [{"url": "/docs/sql/create-view/?v=11", "label": "CREATE VIEW"}], "release": {"ref": "Local English manual 11.22", "label": "11.22", "major": "11", "channel": "historical", "revision": "284f2186559443efefbb1ea3b00740c25dccd01e540ecbdb81dadf5127e54a0b"}, "sources": [{"url": "/docs/11/sql-createview.html", "path": "sql-createview.html", "label": "PostgreSQL 11 English manual", "sha256": "cb691ccbc81965b50e4404c037e081b1038886bed54a2da7ed28d083ff11becd"}], "sections": [{"title": "View options", "paragraphs": ["Views do not store query results. Set these security or update semantics with CREATE VIEW WITH or ALTER VIEW."]}, {"title": "Write checks", "paragraphs": ["This option controls the behavior of automatically updatable views. When this option is specified, INSERT and UPDATE commands on the view will be checked to ensure that new rows satisfy the view-defining condition (that is, the new rows are checked to ensure that they are visible through the view). If they are not, the update will be rejected. If the CHECK OPTION is not specified, INSERT and UPDATE commands on the view are allowed to create rows that are not visible through the view. The following check options are supported:", "LOCAL", "New rows are only checked against the conditions defined directly in the view itself. Any conditions defined on underlying base views are not checked (unless they also specify the CHECK OPTION ).", "CASCADED", "New rows are checked against the conditions of the view and all underlying base views. If the CHECK OPTION is specified, and neither LOCAL nor CASCADED is specified, then CASCADED is assumed.", "The CHECK OPTION may not be used with RECURSIVE views.", "Note that the CHECK OPTION is only supported on views that are automatically updatable, and do not have INSTEAD OF triggers or INSTEAD rules. If an automatically updatable view is defined on top of a base view that has INSTEAD OF triggers, then the LOCAL CHECK OPTION may be used to check the conditions on the automatically updatable view, but the conditions on the base view with INSTEAD OF triggers will not be checked (a cascaded check option will not cascade down to a trigger-updatable view, and any check options defined directly on a trigger-updatable view will be ignored). If the view or any of its base relations has an INSTEAD rule that causes the INSERT or UPDATE command to be rewritten, then all check options will be ignored in the rewritten query, including any checks from automatically updatable views defined on top of the relation with the INSTEAD rule."]}], "signature": "WITH (check_option = value)", "description": ["This parameter may be either local or cascaded , and is equivalent to specifying WITH [ CASCADED | LOCAL ] CHECK OPTION (see below). This option can be changed on existing views using ALTER VIEW ."]}, "12": {"facts": [{"label": "Applies to", "value": "View options"}, {"label": "Value type", "value": "string"}, {"label": "Values", "value": "local, cascaded"}], "related": [{"url": "/docs/sql/create-view/?v=12", "label": "CREATE VIEW"}], "release": {"ref": "Local English manual 12.22", "label": "12.22", "major": "12", "channel": "historical", "revision": "0a1032bc0c23478646e9ee7d36edb066dca27b8540fd64d7fd47dcb6a8a6ccb4"}, "sources": [{"url": "/docs/12/sql-createview.html", "path": "sql-createview.html", "label": "PostgreSQL 12 English manual", "sha256": "30c56ff14a8865b60f2954e70821eb7a6187fb35c2140b4c5697894b6f24bc9e"}], "sections": [{"title": "View options", "paragraphs": ["Views do not store query results. Set these security or update semantics with CREATE VIEW WITH or ALTER VIEW."]}, {"title": "Write checks", "paragraphs": ["This option controls the behavior of automatically updatable views. When this option is specified, INSERT and UPDATE commands on the view will be checked to ensure that new rows satisfy the view-defining condition (that is, the new rows are checked to ensure that they are visible through the view). If they are not, the update will be rejected. If the CHECK OPTION is not specified, INSERT and UPDATE commands on the view are allowed to create rows that are not visible through the view. The following check options are supported:", "LOCAL", "New rows are only checked against the conditions defined directly in the view itself. Any conditions defined on underlying base views are not checked (unless they also specify the CHECK OPTION ).", "CASCADED", "New rows are checked against the conditions of the view and all underlying base views. If the CHECK OPTION is specified, and neither LOCAL nor CASCADED is specified, then CASCADED is assumed.", "The CHECK OPTION may not be used with RECURSIVE views.", "Note that the CHECK OPTION is only supported on views that are automatically updatable, and do not have INSTEAD OF triggers or INSTEAD rules. If an automatically updatable view is defined on top of a base view that has INSTEAD OF triggers, then the LOCAL CHECK OPTION may be used to check the conditions on the automatically updatable view, but the conditions on the base view with INSTEAD OF triggers will not be checked (a cascaded check option will not cascade down to a trigger-updatable view, and any check options defined directly on a trigger-updatable view will be ignored). If the view or any of its base relations has an INSTEAD rule that causes the INSERT or UPDATE command to be rewritten, then all check options will be ignored in the rewritten query, including any checks from automatically updatable views defined on top of the relation with the INSTEAD rule."]}], "signature": "WITH (check_option = value)", "description": ["This parameter may be either local or cascaded , and is equivalent to specifying WITH [ CASCADED | LOCAL ] CHECK OPTION (see below). This option can be changed on existing views using ALTER VIEW ."]}, "13": {"facts": [{"label": "Applies to", "value": "View options"}, {"label": "Value type", "value": "enum"}, {"label": "Values", "value": "local, cascaded"}], "related": [{"url": "/docs/sql/create-view/?v=13", "label": "CREATE VIEW"}], "release": {"ref": "Local English manual 13.23", "label": "13.23", "major": "13", "channel": "historical", "revision": "346825c2d5fbebb2bd997afbb2d49edfd782dce050c0b934e84a883e5446a99f"}, "sources": [{"url": "/docs/13/sql-createview.html", "path": "sql-createview.html", "label": "PostgreSQL 13 English manual", "sha256": "99ec0fd97653a0486c7d2575acc9713f73e2a9b12464e4dfa0b2046e772fd111"}], "sections": [{"title": "View options", "paragraphs": ["Views do not store query results. Set these security or update semantics with CREATE VIEW WITH or ALTER VIEW."]}, {"title": "Write checks", "paragraphs": ["This option controls the behavior of automatically updatable views. When this option is specified, INSERT and UPDATE commands on the view will be checked to ensure that new rows satisfy the view-defining condition (that is, the new rows are checked to ensure that they are visible through the view). If they are not, the update will be rejected. If the CHECK OPTION is not specified, INSERT and UPDATE commands on the view are allowed to create rows that are not visible through the view. The following check options are supported:", "LOCAL", "New rows are only checked against the conditions defined directly in the view itself. Any conditions defined on underlying base views are not checked (unless they also specify the CHECK OPTION ).", "CASCADED", "New rows are checked against the conditions of the view and all underlying base views. If the CHECK OPTION is specified, and neither LOCAL nor CASCADED is specified, then CASCADED is assumed.", "The CHECK OPTION may not be used with RECURSIVE views.", "Note that the CHECK OPTION is only supported on views that are automatically updatable, and do not have INSTEAD OF triggers or INSTEAD rules. If an automatically updatable view is defined on top of a base view that has INSTEAD OF triggers, then the LOCAL CHECK OPTION may be used to check the conditions on the automatically updatable view, but the conditions on the base view with INSTEAD OF triggers will not be checked (a cascaded check option will not cascade down to a trigger-updatable view, and any check options defined directly on a trigger-updatable view will be ignored). If the view or any of its base relations has an INSTEAD rule that causes the INSERT or UPDATE command to be rewritten, then all check options will be ignored in the rewritten query, including any checks from automatically updatable views defined on top of the relation with the INSTEAD rule."]}], "signature": "WITH (check_option = value)", "description": ["This parameter may be either local or cascaded , and is equivalent to specifying WITH [ CASCADED | LOCAL ] CHECK OPTION (see below). This option can be changed on existing views using ALTER VIEW ."]}, "14": {"facts": [{"label": "Applies to", "value": "View options"}, {"label": "Value type", "value": "enum"}, {"label": "Values", "value": "local, cascaded"}], "related": [{"url": "/docs/sql/create-view/?v=14", "label": "CREATE VIEW"}], "release": {"ref": "Local English manual 14.24", "label": "14.24", "major": "14", "channel": "stable", "revision": "b6e7ed6d017bf1d63aae215156cde763babd657199df9fa10123733290c31260"}, "sources": [{"url": "/docs/14/sql-createview.html", "path": "sql-createview.html", "label": "PostgreSQL 14 English manual", "sha256": "ce32f28c1a1e064f26c167a63d68b7d3dd61213f16597c23a377f5c0fcfd3155"}], "sections": [{"title": "View options", "paragraphs": ["Views do not store query results. Set these security or update semantics with CREATE VIEW WITH or ALTER VIEW."]}, {"title": "Write checks", "paragraphs": ["This option controls the behavior of automatically updatable views. When this option is specified, INSERT and UPDATE commands on the view will be checked to ensure that new rows satisfy the view-defining condition (that is, the new rows are checked to ensure that they are visible through the view). If they are not, the update will be rejected. If the CHECK OPTION is not specified, INSERT and UPDATE commands on the view are allowed to create rows that are not visible through the view. The following check options are supported:", "LOCAL", "New rows are only checked against the conditions defined directly in the view itself. Any conditions defined on underlying base views are not checked (unless they also specify the CHECK OPTION ).", "CASCADED", "New rows are checked against the conditions of the view and all underlying base views. If the CHECK OPTION is specified, and neither LOCAL nor CASCADED is specified, then CASCADED is assumed.", "The CHECK OPTION may not be used with RECURSIVE views.", "Note that the CHECK OPTION is only supported on views that are automatically updatable, and do not have INSTEAD OF triggers or INSTEAD rules. If an automatically updatable view is defined on top of a base view that has INSTEAD OF triggers, then the LOCAL CHECK OPTION may be used to check the conditions on the automatically updatable view, but the conditions on the base view with INSTEAD OF triggers will not be checked (a cascaded check option will not cascade down to a trigger-updatable view, and any check options defined directly on a trigger-updatable view will be ignored). If the view or any of its base relations has an INSTEAD rule that causes the INSERT or UPDATE command to be rewritten, then all check options will be ignored in the rewritten query, including any checks from automatically updatable views defined on top of the relation with the INSTEAD rule."]}], "signature": "WITH (check_option = value)", "description": ["This parameter may be either local or cascaded , and is equivalent to specifying WITH [ CASCADED | LOCAL ] CHECK OPTION (see below). This option can be changed on existing views using ALTER VIEW ."]}, "15": {"facts": [{"label": "Applies to", "value": "View options"}, {"label": "Value type", "value": "enum"}, {"label": "Values", "value": "local, cascaded"}], "related": [{"url": "/docs/sql/create-view/?v=15", "label": "CREATE VIEW"}], "release": {"ref": "Local English manual 15.19", "label": "15.19", "major": "15", "channel": "stable", "revision": "643ecd492fa284d4d55861f15cbd7c0c7451abce96c8d56485bb2729caba37d5"}, "sources": [{"url": "/docs/15/sql-createview.html", "path": "sql-createview.html", "label": "PostgreSQL 15 English manual", "sha256": "5e264be14c16e87295e86ed356aea640f7a46a5a5fe713dc20c903e8301d690c"}], "sections": [{"title": "View options", "paragraphs": ["Views do not store query results. Set these security or update semantics with CREATE VIEW WITH or ALTER VIEW."]}, {"title": "Write checks", "paragraphs": ["This option controls the behavior of automatically updatable views. When this option is specified, INSERT and UPDATE commands on the view will be checked to ensure that new rows satisfy the view-defining condition (that is, the new rows are checked to ensure that they are visible through the view). If they are not, the update will be rejected. If the CHECK OPTION is not specified, INSERT and UPDATE commands on the view are allowed to create rows that are not visible through the view. The following check options are supported:", "LOCAL", "New rows are only checked against the conditions defined directly in the view itself. Any conditions defined on underlying base views are not checked (unless they also specify the CHECK OPTION ).", "CASCADED", "New rows are checked against the conditions of the view and all underlying base views. If the CHECK OPTION is specified, and neither LOCAL nor CASCADED is specified, then CASCADED is assumed.", "The CHECK OPTION may not be used with RECURSIVE views.", "Note that the CHECK OPTION is only supported on views that are automatically updatable, and do not have INSTEAD OF triggers or INSTEAD rules. If an automatically updatable view is defined on top of a base view that has INSTEAD OF triggers, then the LOCAL CHECK OPTION may be used to check the conditions on the automatically updatable view, but the conditions on the base view with INSTEAD OF triggers will not be checked (a cascaded check option will not cascade down to a trigger-updatable view, and any check options defined directly on a trigger-updatable view will be ignored). If the view or any of its base relations has an INSTEAD rule that causes the INSERT or UPDATE command to be rewritten, then all check options will be ignored in the rewritten query, including any checks from automatically updatable views defined on top of the relation with the INSTEAD rule."]}], "signature": "WITH (check_option = value)", "description": ["This parameter may be either local or cascaded , and is equivalent to specifying WITH [ CASCADED | LOCAL ] CHECK OPTION (see below)."]}, "16": {"facts": [{"label": "Applies to", "value": "View options"}, {"label": "Value type", "value": "enum"}, {"label": "Values", "value": "local, cascaded"}], "related": [{"url": "/docs/sql/create-view/?v=16", "label": "CREATE VIEW"}], "release": {"ref": "Local English manual 16.15", "label": "16.15", "major": "16", "channel": "stable", "revision": "0080d7d37081f27216dc4aa4f6ad85ea24c0c0441e702e6d0b190a339fd76f62"}, "sources": [{"url": "/docs/16/sql-createview.html", "path": "sql-createview.html", "label": "PostgreSQL 16 English manual", "sha256": "4b881ea4898cc76b99becc82db07c4f45d51eb92566127d308b676625b4d06fd"}], "sections": [{"title": "View options", "paragraphs": ["Views do not store query results. Set these security or update semantics with CREATE VIEW WITH or ALTER VIEW."]}, {"title": "Write checks", "paragraphs": ["This option controls the behavior of automatically updatable views. When this option is specified, INSERT and UPDATE commands on the view will be checked to ensure that new rows satisfy the view-defining condition (that is, the new rows are checked to ensure that they are visible through the view). If they are not, the update will be rejected. If the CHECK OPTION is not specified, INSERT and UPDATE commands on the view are allowed to create rows that are not visible through the view. The following check options are supported:", "LOCAL", "New rows are only checked against the conditions defined directly in the view itself. Any conditions defined on underlying base views are not checked (unless they also specify the CHECK OPTION ).", "CASCADED", "New rows are checked against the conditions of the view and all underlying base views. If the CHECK OPTION is specified, and neither LOCAL nor CASCADED is specified, then CASCADED is assumed.", "The CHECK OPTION may not be used with RECURSIVE views.", "Note that the CHECK OPTION is only supported on views that are automatically updatable, and do not have INSTEAD OF triggers or INSTEAD rules. If an automatically updatable view is defined on top of a base view that has INSTEAD OF triggers, then the LOCAL CHECK OPTION may be used to check the conditions on the automatically updatable view, but the conditions on the base view with INSTEAD OF triggers will not be checked (a cascaded check option will not cascade down to a trigger-updatable view, and any check options defined directly on a trigger-updatable view will be ignored). If the view or any of its base relations has an INSTEAD rule that causes the INSERT or UPDATE command to be rewritten, then all check options will be ignored in the rewritten query, including any checks from automatically updatable views defined on top of the relation with the INSTEAD rule."]}], "signature": "WITH (check_option = value)", "description": ["This parameter may be either local or cascaded , and is equivalent to specifying WITH [ CASCADED | LOCAL ] CHECK OPTION (see below)."]}, "17": {"facts": [{"label": "Applies to", "value": "View options"}, {"label": "Value type", "value": "enum"}, {"label": "Values", "value": "local, cascaded"}], "related": [{"url": "/docs/sql/create-view/?v=17", "label": "CREATE VIEW"}], "release": {"ref": "Local English manual 17.11", "label": "17.11", "major": "17", "channel": "stable", "revision": "440f894c3464e7cb4fedc9846b948ca21cd2ffcef1697ff56a28eb641ee7c3d8"}, "sources": [{"url": "/docs/17/sql-createview.html", "path": "sql-createview.html", "label": "PostgreSQL 17 English manual", "sha256": "80b0ff1f7c82a347bb322670817b6cc38c71b249f6b49163dcdd80f3bbd184a4"}], "sections": [{"title": "View options", "paragraphs": ["Views do not store query results. Set these security or update semantics with CREATE VIEW WITH or ALTER VIEW."]}, {"title": "Write checks", "paragraphs": ["This option controls the behavior of automatically updatable views. When this option is specified, INSERT , UPDATE , and MERGE commands on the view will be checked to ensure that new rows satisfy the view-defining condition (that is, the new rows are checked to ensure that they are visible through the view). If they are not, the update will be rejected. If the CHECK OPTION is not specified, INSERT , UPDATE , and MERGE commands on the view are allowed to create rows that are not visible through the view. The following check options are supported:", "LOCAL", "New rows are only checked against the conditions defined directly in the view itself. Any conditions defined on underlying base views are not checked (unless they also specify the CHECK OPTION ).", "CASCADED", "New rows are checked against the conditions of the view and all underlying base views. If the CHECK OPTION is specified, and neither LOCAL nor CASCADED is specified, then CASCADED is assumed.", "The CHECK OPTION may not be used with RECURSIVE views.", "Note that the CHECK OPTION is only supported on views that are automatically updatable, and do not have INSTEAD OF triggers or INSTEAD rules. If an automatically updatable view is defined on top of a base view that has INSTEAD OF triggers, then the LOCAL CHECK OPTION may be used to check the conditions on the automatically updatable view, but the conditions on the base view with INSTEAD OF triggers will not be checked (a cascaded check option will not cascade down to a trigger-updatable view, and any check options defined directly on a trigger-updatable view will be ignored). If the view or any of its base relations has an INSTEAD rule that causes the INSERT or UPDATE command to be rewritten, then all check options will be ignored in the rewritten query, including any checks from automatically updatable views defined on top of the relation with the INSTEAD rule. MERGE is not supported if the view or any of its base relations have rules."]}], "signature": "WITH (check_option = value)", "description": ["This parameter may be either local or cascaded , and is equivalent to specifying WITH [ CASCADED | LOCAL ] CHECK OPTION (see below)."]}, "18": {"facts": [{"label": "Applies to", "value": "View options"}, {"label": "Value type", "value": "enum"}, {"label": "Values", "value": "local, cascaded"}], "related": [{"url": "/docs/sql/create-view/?v=18", "label": "CREATE VIEW"}], "release": {"ref": "Local English manual 18.6", "label": "18.6", "major": "18", "channel": "stable", "revision": "eb6c2292fdf28e1b4635ab478eec3919411cdf4a6c07553387870e26201f3744"}, "sources": [{"url": "/docs/18/sql-createview.html", "path": "sql-createview.html", "label": "PostgreSQL 18 English manual", "sha256": "0c11551250a39c2136437e8cded6bcb5bb8d324fa60b9b2e86b2276ad60ee599"}], "sections": [{"title": "View options", "paragraphs": ["Views do not store query results. Set these security or update semantics with CREATE VIEW WITH or ALTER VIEW."]}, {"title": "Write checks", "paragraphs": ["This option controls the behavior of automatically updatable views. When this option is specified, INSERT , UPDATE , and MERGE commands on the view will be checked to ensure that new rows satisfy the view-defining condition (that is, the new rows are checked to ensure that they are visible through the view). If they are not, the update will be rejected. If the CHECK OPTION is not specified, INSERT , UPDATE , and MERGE commands on the view are allowed to create rows that are not visible through the view. The following check options are supported:", "LOCAL", "New rows are only checked against the conditions defined directly in the view itself. Any conditions defined on underlying base views are not checked (unless they also specify the CHECK OPTION ).", "CASCADED", "New rows are checked against the conditions of the view and all underlying base views. If the CHECK OPTION is specified, and neither LOCAL nor CASCADED is specified, then CASCADED is assumed.", "The CHECK OPTION may not be used with RECURSIVE views.", "Note that the CHECK OPTION is only supported on views that are automatically updatable, and do not have INSTEAD OF triggers or INSTEAD rules. If an automatically updatable view is defined on top of a base view that has INSTEAD OF triggers, then the LOCAL CHECK OPTION may be used to check the conditions on the automatically updatable view, but the conditions on the base view with INSTEAD OF triggers will not be checked (a cascaded check option will not cascade down to a trigger-updatable view, and any check options defined directly on a trigger-updatable view will be ignored). If the view or any of its base relations has an INSTEAD rule that causes the INSERT or UPDATE command to be rewritten, then all check options will be ignored in the rewritten query, including any checks from automatically updatable views defined on top of the relation with the INSTEAD rule. MERGE is not supported if the view or any of its base relations have rules."]}], "signature": "WITH (check_option = value)", "description": ["This parameter may be either local or cascaded , and is equivalent to specifying WITH [ CASCADED | LOCAL ] CHECK OPTION (see below)."]}, "19": {"facts": [{"label": "Applies to", "value": "View options"}, {"label": "Value type", "value": "enum"}, {"label": "Values", "value": "local, cascaded"}], "related": [{"url": "/docs/sql/create-view/?v=19", "label": "CREATE VIEW"}], "release": {"ref": "Local English manual 19 beta 4", "label": "19 beta 4", "major": "19", "channel": "preview", "revision": "df6d20830d1a09734a2db6ffc3a6138ce80e669294e56a30f6b5d4a89d81aef1"}, "sources": [{"url": "/docs/19/sql-createview.html", "path": "sql-createview.html", "label": "PostgreSQL 19 English manual", "sha256": "eb32d7fd0cdf4f868af1a1a1c866aabe70295e50e327b97c9577a944a6092a79"}], "sections": [{"title": "View options", "paragraphs": ["Views do not store query results. Set these security or update semantics with CREATE VIEW WITH or ALTER VIEW."]}, {"title": "Write checks", "paragraphs": ["This option controls the behavior of automatically updatable views. When this option is specified, INSERT , UPDATE , and MERGE commands on the view will be checked to ensure that new rows satisfy the view-defining condition (that is, the new rows are checked to ensure that they are visible through the view). If they are not, the update will be rejected. If the CHECK OPTION is not specified, INSERT , UPDATE , and MERGE commands on the view are allowed to create rows that are not visible through the view. The following check options are supported:", "LOCAL", "New rows are only checked against the conditions defined directly in the view itself. Any conditions defined on underlying base views are not checked (unless they also specify the CHECK OPTION ).", "CASCADED", "New rows are checked against the conditions of the view and all underlying base views. If the CHECK OPTION is specified, and neither LOCAL nor CASCADED is specified, then CASCADED is assumed.", "The CHECK OPTION may not be used with RECURSIVE views.", "Note that the CHECK OPTION is only supported on views that are automatically updatable, and do not have INSTEAD OF triggers or INSTEAD rules. If an automatically updatable view is defined on top of a base view that has INSTEAD OF triggers, then the LOCAL CHECK OPTION may be used to check the conditions on the automatically updatable view, but the conditions on the base view with INSTEAD OF triggers will not be checked (a cascaded check option will not cascade down to a trigger-updatable view, and any check options defined directly on a trigger-updatable view will be ignored). If the view or any of its base relations has an INSTEAD rule that causes the INSERT or UPDATE command to be rewritten, then all check options will be ignored in the rewritten query, including any checks from automatically updatable views defined on top of the relation with the INSTEAD rule. MERGE is not supported if the view or any of its base relations have rules."]}], "signature": "WITH (check_option = value)", "description": ["This parameter may be either local or cascaded , and is equivalent to specifying WITH [ CASCADED | LOCAL ] CHECK OPTION (see below)."]}, "20": {"facts": [{"label": "Applies to", "value": "View options"}, {"label": "Value type", "value": "enum"}, {"label": "Values", "value": "local, cascaded"}], "related": [{"url": "/docs/sql/create-view/?v=20", "label": "CREATE VIEW"}], "release": {"ref": "2c10c2ce4d7bcd57543a49ab402af02a39724e0a", "label": "20 devel", "major": "20", "channel": "devel", "revision": "ca199fbaaf6c4bd29cd5a98beaf34d9f4141c15d2f94d1d0202f3204ef18d09f"}, "sources": [{"url": "/docs/devel/sql-createview.html", "path": "sql-createview.html", "label": "PostgreSQL 20 English manual", "sha256": "ab4714c547b7e5dc1c3730b0702032f40e58945b0078a5ea5de9f8644c1154ee"}], "sections": [{"title": "View options", "paragraphs": ["Views do not store query results. Set these security or update semantics with CREATE VIEW WITH or ALTER VIEW."]}, {"title": "Write checks", "paragraphs": ["This option controls the behavior of automatically updatable views. When this option is specified, INSERT , UPDATE , and MERGE commands on the view will be checked to ensure that new rows satisfy the view-defining condition (that is, the new rows are checked to ensure that they are visible through the view). If they are not, the update will be rejected. If the CHECK OPTION is not specified, INSERT , UPDATE , and MERGE commands on the view are allowed to create rows that are not visible through the view. The following check options are supported:", "LOCAL", "New rows are only checked against the conditions defined directly in the view itself. Any conditions defined on underlying base views are not checked (unless they also specify the CHECK OPTION ).", "CASCADED", "New rows are checked against the conditions of the view and all underlying base views. If the CHECK OPTION is specified, and neither LOCAL nor CASCADED is specified, then CASCADED is assumed.", "The CHECK OPTION may not be used with RECURSIVE views.", "Note that the CHECK OPTION is only supported on views that are automatically updatable, and do not have INSTEAD OF triggers or INSTEAD rules. If an automatically updatable view is defined on top of a base view that has INSTEAD OF triggers, then the LOCAL CHECK OPTION may be used to check the conditions on the automatically updatable view, but the conditions on the base view with INSTEAD OF triggers will not be checked (a cascaded check option will not cascade down to a trigger-updatable view, and any check options defined directly on a trigger-updatable view will be ignored). If the view or any of its base relations has an INSTEAD rule that causes the INSERT or UPDATE command to be rewritten, then all check options will be ignored in the rewritten query, including any checks from automatically updatable views defined on top of the relation with the INSTEAD rule. MERGE is not supported if the view or any of its base relations have rules."]}], "signature": "WITH (check_option = value)", "description": ["This parameter may be either local or cascaded , and is equivalent to specifying WITH [ CASCADED | LOCAL ] CHECK OPTION (see below)."]}}, "content_hash": "3d459c165d059d881095bfc4bfdb23645b5d9cf14ebb57933008bf14291b1569", "imported_at": "2026-09-27T09:57:59.033"}, "snapshot": {"facts": [{"label": "Applies to", "value": "View options"}, {"label": "Value type", "value": "enum"}, {"label": "Values", "value": "local, cascaded"}], "related": [{"url": "/docs/sql/create-view/?v=18", "label": "CREATE VIEW"}], "release": {"ref": "Local English manual 18.6", "label": "18.6", "major": "18", "channel": "stable", "revision": "eb6c2292fdf28e1b4635ab478eec3919411cdf4a6c07553387870e26201f3744"}, "sources": [{"url": "/docs/18/sql-createview.html", "path": "sql-createview.html", "label": "PostgreSQL 18 English manual", "sha256": "0c11551250a39c2136437e8cded6bcb5bb8d324fa60b9b2e86b2276ad60ee599"}], "sections": [{"title": "View options", "paragraphs": ["Views do not store query results. Set these security or update semantics with CREATE VIEW WITH or ALTER VIEW."]}, {"title": "Write checks", "paragraphs": ["This option controls the behavior of automatically updatable views. When this option is specified, INSERT , UPDATE , and MERGE commands on the view will be checked to ensure that new rows satisfy the view-defining condition (that is, the new rows are checked to ensure that they are visible through the view). If they are not, the update will be rejected. If the CHECK OPTION is not specified, INSERT , UPDATE , and MERGE commands on the view are allowed to create rows that are not visible through the view. The following check options are supported:", "LOCAL", "New rows are only checked against the conditions defined directly in the view itself. Any conditions defined on underlying base views are not checked (unless they also specify the CHECK OPTION ).", "CASCADED", "New rows are checked against the conditions of the view and all underlying base views. If the CHECK OPTION is specified, and neither LOCAL nor CASCADED is specified, then CASCADED is assumed.", "The CHECK OPTION may not be used with RECURSIVE views.", "Note that the CHECK OPTION is only supported on views that are automatically updatable, and do not have INSTEAD OF triggers or INSTEAD rules. If an automatically updatable view is defined on top of a base view that has INSTEAD OF triggers, then the LOCAL CHECK OPTION may be used to check the conditions on the automatically updatable view, but the conditions on the base view with INSTEAD OF triggers will not be checked (a cascaded check option will not cascade down to a trigger-updatable view, and any check options defined directly on a trigger-updatable view will be ignored). If the view or any of its base relations has an INSTEAD rule that causes the INSERT or UPDATE command to be rewritten, then all check options will be ignored in the rewritten query, including any checks from automatically updatable views defined on top of the relation with the INSTEAD rule. MERGE is not supported if the view or any of its base relations have rules."]}], "signature": "WITH (check_option = value)", "description": ["This parameter may be either local or cascaded , and is equivalent to specifying WITH [ CASCADED | LOCAL ] CHECK OPTION (see below)."]}, "comparison": {"left": "12", "right": "13", "status": "changed", "diff": "--- PostgreSQL 12\n+++ PostgreSQL 13\n@@ -6,7 +6,7 @@\n     },\n     {\n       \"label\": \"Value type\",\n-      \"value\": \"string\"\n+      \"value\": \"enum\"\n     },\n     {\n       \"label\": \"Values\","}}