Skip to content

Commit a2aa89e

Browse files
author
Lauren
committed
Add note that IMPORT INTO invalidates FKs
Closes cockroachdb#7278.
1 parent 309fa39 commit a2aa89e

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

v19.2/import-into.md

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ toc: true
1010

1111
- `IMPORT INTO` only works for existing tables. For information on how to import data into new tables, see [`IMPORT`](import.html).
1212
- `IMPORT INTO` cannot be used within a [transaction](transactions.html) or during a [rolling upgrade](upgrade-cockroach-version.html).
13+
- `IMPORT INTO` invalidates all [foreign keys](foreign-key) on the target table. To validate the foreign key(s), use the [`VALIDATE CONSTRAINT`](validate-constraint.html) statement.
1314
- `IMPORT INTO` cannot be used to insert data into a column for an existing row. To do this, use [`INSERT`](insert.html).
1415

1516
## Required privileges

v20.1/import-into.md

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ The `IMPORT INTO` [statement](sql-statements.html) imports CSV data into an [exi
1010

1111
- `IMPORT INTO` only works for existing tables. For information on how to import data into new tables, see [`IMPORT`](import.html).
1212
- `IMPORT INTO` cannot be used within a [transaction](transactions.html) or during a [rolling upgrade](upgrade-cockroach-version.html).
13+
- `IMPORT INTO` invalidates all [foreign keys](foreign-key) on the target table. To validate the foreign key(s), use the [`VALIDATE CONSTRAINT`](validate-constraint.html) statement.
1314
- `IMPORT INTO` cannot be used to insert data into a column for an existing row. To do this, use [`INSERT`](insert.html).
1415

1516
## Required privileges

v20.2/import-into.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ The `IMPORT INTO` [statement](sql-statements.html) imports CSV data into an [exi
1010

1111
- `IMPORT INTO` only works for existing tables. For information on how to import data into new tables, see [`IMPORT`](import.html).
1212
- `IMPORT INTO` cannot be used within a [transaction](transactions.html) or during a [rolling upgrade](upgrade-cockroach-version.html).
13+
- `IMPORT INTO` invalidates all [foreign keys](foreign-key) on the target table. To validate the foreign key(s), use the [`VALIDATE CONSTRAINT`](validate-constraint.html) statement.
1314
- `IMPORT INTO` cannot be used to insert data into a column for an existing row. To do this, use [`INSERT`](insert.html).
1415

15-
1616
## Required privileges
1717

1818
Only members of the `admin` role can run `IMPORT INTO`. By default, the `root` user belongs to the `admin` role.

0 commit comments

Comments
 (0)