mirror of
https://github.com/postgres/postgres.git
synced 2025-09-09 13:09:39 +03:00
WITH CHECK OPTION support for auto-updatable VIEWs
For simple views which are automatically updatable, this patch allows the user to specify what level of checking should be done on records being inserted or updated. For 'LOCAL CHECK', new tuples are validated against the conditionals of the view they are being inserted into, while for 'CASCADED CHECK' the new tuples are validated against the conditionals for all views involved (from the top down). This option is part of the SQL specification. Dean Rasheed, reviewed by Pavel Stehule
This commit is contained in:
@@ -303,6 +303,8 @@ typedef struct JunkFilter
|
||||
* TrigInstrument optional runtime measurements for triggers
|
||||
* FdwRoutine FDW callback functions, if foreign table
|
||||
* FdwState available to save private state of FDW
|
||||
* WithCheckOptions list of WithCheckOption's for views
|
||||
* WithCheckOptionExprs list of WithCheckOption expr states
|
||||
* ConstraintExprs array of constraint-checking expr states
|
||||
* junkFilter for removing junk attributes from tuples
|
||||
* projectReturning for computing a RETURNING list
|
||||
@@ -322,6 +324,8 @@ typedef struct ResultRelInfo
|
||||
Instrumentation *ri_TrigInstrument;
|
||||
struct FdwRoutine *ri_FdwRoutine;
|
||||
void *ri_FdwState;
|
||||
List *ri_WithCheckOptions;
|
||||
List *ri_WithCheckOptionExprs;
|
||||
List **ri_ConstraintExprs;
|
||||
JunkFilter *ri_junkFilter;
|
||||
ProjectionInfo *ri_projectReturning;
|
||||
|
Reference in New Issue
Block a user