Skip to content

Commit

Permalink
sql: Uopdate unimplemented reference
Browse files Browse the repository at this point in the history
And also clean up the wording to be more explicit.

The error for not being able to add a reference via alter was pointing to the
incorrect github ID cockroachdb#8855. It's been updated to point to cockroachdb#32917 instead.

Release note: None
  • Loading branch information
BramGruneir committed Dec 13, 2018
1 parent 7d0deef commit 645ba1a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions pkg/sql/alter_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ func (n *alterTableNode) startExec(params runParams) error {
d := t.ColumnDef
if len(d.CheckExprs) > 0 {
return pgerror.UnimplementedWithIssueError(29639,
"adding a CHECK constraint via ALTER not supported")
"adding a CHECK constraint while also adding a column via ALTER not supported")
}
if d.HasFKConstraint() {
return pgerror.UnimplementedWithIssueError(8855,
"adding a REFERENCES constraint via ALTER not supported")
return pgerror.UnimplementedWithIssueError(32917,
"adding a REFERENCES constraint while also adding a column via ALTER not supported")
}

newDef, seqDbDesc, seqName, seqOpts, err := params.p.processSerialInColumnDef(params.ctx, d, tn)
Expand Down
4 changes: 2 additions & 2 deletions pkg/sql/logictest/testdata/logic_test/alter_table
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,10 @@ ALTER TABLE o DROP COLUMN h
statement ok
ALTER TABLE o DROP COLUMN h CASCADE

statement error adding a CHECK constraint via ALTER not supported
statement error adding a CHECK constraint while also adding a column via ALTER not supported
ALTER TABLE t ADD f INT CHECK (f>1)

statement error adding a REFERENCES constraint via ALTER not supported
statement error adding a REFERENCES constraint while also adding a column via ALTER not supported
ALTER TABLE t ADD f INT UNIQUE REFERENCES other

# Test that more than one column with constraints can be added in the same
Expand Down

0 comments on commit 645ba1a

Please sign in to comment.