aboutsummaryrefslogtreecommitdiff
path: root/src/trigger.c
diff options
context:
space:
mode:
authordrh <>2021-08-02 16:41:57 +0000
committerdrh <>2021-08-02 16:41:57 +0000
commitf38524d20db165c94dc94e06b62f0aad5942a03b (patch)
treed5f916ae22a0bae1a3d7168c0b1a031d6c22da92 /src/trigger.c
parent79cf2b7120ea382a2649698656860d09740e6205 (diff)
downloadsqlite-f38524d20db165c94dc94e06b62f0aad5942a03b.tar.gz
sqlite-f38524d20db165c94dc94e06b62f0aad5942a03b.zip
Refactor the Table object to reduce its memory footprint.
FossilOrigin-Name: bbb6759bcf6e01d36dfc787a82a610d359f50aaeac8104b73883a84906d54e1f
Diffstat (limited to 'src/trigger.c')
-rw-r--r--src/trigger.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/trigger.c b/src/trigger.c
index c5beeb984..4db697c65 100644
--- a/src/trigger.c
+++ b/src/trigger.c
@@ -219,12 +219,12 @@ void sqlite3BeginTrigger(
/* INSTEAD of triggers are only for views and views only support INSTEAD
** of triggers.
*/
- if( pTab->pSelect && tr_tm!=TK_INSTEAD ){
+ if( IsView(pTab) && tr_tm!=TK_INSTEAD ){
sqlite3ErrorMsg(pParse, "cannot create %s trigger on view: %S",
(tr_tm == TK_BEFORE)?"BEFORE":"AFTER", pTableName->a);
goto trigger_orphan_error;
}
- if( !pTab->pSelect && tr_tm==TK_INSTEAD ){
+ if( !IsView(pTab) && tr_tm==TK_INSTEAD ){
sqlite3ErrorMsg(pParse, "cannot create INSTEAD OF"
" trigger on table: %S", pTableName->a);
goto trigger_orphan_error;