sql/schemachanger: check nil table name for comment on column#83812
Conversation
ajwerner
left a comment
There was a problem hiding this comment.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status:complete! 0 of 0 LGTMs obtained (waiting on @chengxiong-ruan)
pkg/sql/schemachanger/scbuild/internal/scbuildstmt/comment_on.go line 108 at r1 (raw file):
func CommentOnColumn(b BuildCtx, n *tree.CommentOnColumn) { if n.ColumnItem.TableName == nil { panic(pgerror.New(pgcode.InvalidParameterValue, "table name must be provided"))
Postgres throws pgcode.Syntax with the message: ERROR: 42601: column name must be qualified. Can we use that?
2b0d555 to
7e9be0e
Compare
throw pg error instead of panic on nil pointer. Release note: None.
7e9be0e to
df380db
Compare
|
Previously, ajwerner wrote…
Done. Thanks for catching that. |
ajwerner
left a comment
There was a problem hiding this comment.
Reviewed 4 of 4 files at r3, all commit messages.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @chengxiong-ruan)
|
TFTR! bors r+ |
|
bots... |
|
Build failed (retrying...): |
|
Build succeeded: |
addressing this build error
throw pg error instead of panic on nil pointer.
Release note: None.