Documentation Source Text

Check-in [c951c8c482]
Login

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

Overview
Comment:Improvements to the RENAME COLUMN syntax diagram.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: c951c8c48208bdabb146717446ca7792873b5d37d9197473832d58d3c86270dc
User & Date: drh 2018-09-06 21:37:48.918
Context
2018-09-10
14:56
Update the change log with recent bug fixes. (check-in: eba1c4fd81 user: drh tags: trunk)
2018-09-06
21:37
Improvements to the RENAME COLUMN syntax diagram. (check-in: c951c8c482 user: drh tags: trunk)
20:36
Fix a long-standing typo in the ALTER TABLE documentation. (check-in: 9b5947f2ee user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to art/syntax/alter-table-stmt.gif.

cannot compute difference between binary files

Changes to art/syntax/bubble-generator-data.tcl.
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
      }
  }
  alter-table-stmt {
    rightstack
       {line ALTER TABLE {optx /schema-name .} /table-name}
       {tailbranch
          {line RENAME TO /new-table-name}
          {line RENAME {optx COLUMN} /old-column-name TO /new-column-name}
          {line ADD {optx COLUMN} column-def}
       }
  }
  analyze-stmt {
     line ANALYZE {or nil /schema-name /table-or-index-name
                    {line /schema-name . /table-or-index-name}}
  }







|







47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
      }
  }
  alter-table-stmt {
    rightstack
       {line ALTER TABLE {optx /schema-name .} /table-name}
       {tailbranch
          {line RENAME TO /new-table-name}
          {line RENAME {optx COLUMN} /column-name TO /new-column-name}
          {line ADD {optx COLUMN} column-def}
       }
  }
  analyze-stmt {
     line ANALYZE {or nil /schema-name /table-or-index-name
                    {line /schema-name . /table-or-index-name}}
  }
Changes to pages/lang.in.
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
^If the table being renamed has triggers or indices, then these remain
attached to the table after it has been renamed.  
Beginning with release 3.25.0 ([dateof:3.25.0]), references to the table
within trigger bodies and view definitions are also renamed.
</p>

<p> The RENAME COLUMN TO syntax changes the
<yyterm>old-column-name</yyterm> of table <yyterm>table-name</yyterm>
into <yyterm>new-column-name</yyterm>.  The column name is changed both
within the table definition itself and also within all indexes, triggers,
and views that reference the column.  If the column name change would
result in a semantic ambiguity in a trigger or view, then the RENAME
COLUMN fails with an error and no changes are applied.

<p> ^The ADD COLUMN syntax







|







131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
^If the table being renamed has triggers or indices, then these remain
attached to the table after it has been renamed.  
Beginning with release 3.25.0 ([dateof:3.25.0]), references to the table
within trigger bodies and view definitions are also renamed.
</p>

<p> The RENAME COLUMN TO syntax changes the
<yyterm>column-name</yyterm> of table <yyterm>table-name</yyterm>
into <yyterm>new-column-name</yyterm>.  The column name is changed both
within the table definition itself and also within all indexes, triggers,
and views that reference the column.  If the column name change would
result in a semantic ambiguity in a trigger or view, then the RENAME
COLUMN fails with an error and no changes are applied.

<p> ^The ADD COLUMN syntax