From 3edd193eb34e55f7662a46e1ef583905513450ea Mon Sep 17 00:00:00 2001 From: Jordan Lewis Date: Fri, 27 Mar 2020 10:54:02 -0400 Subject: [PATCH] sqlbase: unimplemented error for fk on comp cols Release note: None Release justification: low risk error message change --- pkg/sql/sqlbase/structured.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/sql/sqlbase/structured.go b/pkg/sql/sqlbase/structured.go index 4d86a787de16..9d22201bfd93 100644 --- a/pkg/sql/sqlbase/structured.go +++ b/pkg/sql/sqlbase/structured.go @@ -3831,9 +3831,8 @@ func (desc *ColumnDescriptor) ComputedExprStr() string { // CheckCanBeFKRef returns whether the given column is computed. func (desc *ColumnDescriptor) CheckCanBeFKRef() error { if desc.IsComputed() { - return pgerror.Newf( - pgcode.InvalidTableDefinition, - "computed column %q cannot be a foreign key reference", + return unimplemented.NewWithIssuef( + 46672, "computed column %q cannot be a foreign key reference", desc.Name, ) }