Documentation Source Text

Check-in [e0f55595d4]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Clarify the rules for referencing tables in triggers.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: e0f55595d4a0da400bcfd1d9bf38a03bf90b1c59685fb497f48ae8b91f70f0ac
User & Date: drh 2017-06-09 12:23:02
Context
2017-06-16
11:53
Add change-log, chronology, and news entries for the 3.18.1 release. check-in: 48b0c119e2 user: drh tags: trunk
2017-06-09
12:23
Clarify the rules for referencing tables in triggers. check-in: e0f55595d4 user: drh tags: trunk
2017-06-08
19:31
Refinements to the faster-than-filesystem article based on peer review. check-in: e5a09f2ea2 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to pages/lang.in.

  1258   1258   restrictions apply:</p>
  1259   1259   
  1260   1260   <ul>
  1261   1261   <li><p>
  1262   1262     ^(The name of the table to be modified in an [UPDATE], [DELETE], or [INSERT]
  1263   1263     statement must be an unqualified table name.  In other words, one must
  1264   1264     use just "<i>tablename</i>" not "<i>database</i><b>.</b><i>tablename</i>"
  1265         -  when specifying the table.)^  ^The table to be modified must exist in the
         1265  +  when specifying the table.)^ </p></li>
         1266  +
         1267  +<li><p>
         1268  + ^For non-TEMP triggers,
         1269  +  the table to be modified or queried must exist in the
  1266   1270     same database as the table or view to which the trigger is attached.
         1271  +  ^(TEMP triggers are not subject to the same-database rule.  A TEMP
         1272  +  trigger is allowed to query or modify any table in any [ATTACH]-ed database.)^
  1267   1273     </p></li>
  1268   1274   
  1269   1275   <li><p>
  1270   1276     ^The "INSERT INTO <i>table</i> DEFAULT VALUES" form of the [INSERT] statement
  1271   1277     is not supported.
  1272   1278     </p></li>
  1273   1279