Skip to content

sql: Add support for parsing ALTER COLUMN TYPE#24958

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
bobvawter:alter
May 2, 2018
Merged

sql: Add support for parsing ALTER COLUMN TYPE#24958
craig[bot] merged 1 commit intocockroachdb:masterfrom
bobvawter:alter

Conversation

@bobvawter
Copy link
Copy Markdown
Contributor

This change adds SQL parsing support for the proposed ALTER COLUMN TYPE syntax
in RFC #24703. It still returns an unimplemented error message to the caller.

Release note: none

@bobvawter bobvawter requested review from a team April 20, 2018 16:03
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@madelynnblue
Copy link
Copy Markdown
Contributor

The BNF generators (diagrams.go in cmd/docgen) need to be updated. I can help out if needed: they are kinda annoying. For instance, add_column.bnf needs to be unchanged since this isn't an add column.

Also add me as a reviewer next time so I see these PRs. I just found it while looking for other stuff.


Review status: 0 of 10 files reviewed at latest revision, all discussions resolved.


pkg/sql/sem/tree/alter_table.go, line 164 at r1 (raw file):

// Format implements the NodeFormatter interface.
func (node *AlterTableAlterColumnType) Format(ctx *FmtCtx) {

This needs tests. See TestParse in parse_test.go.


Comments from Reviewable

This change adds SQL parsing support for the proposed ALTER COLUMN TYPE syntax
in RFC #24703. It still returns an unimplemented error message to the caller.

Release note: None
@bobvawter
Copy link
Copy Markdown
Contributor Author

PTAL: Updated docgen and verified that the resulting BNF result in pretty pictures.

@bobvawter
Copy link
Copy Markdown
Contributor Author

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented May 2, 2018

Canceled (will resume)

craig bot pushed a commit that referenced this pull request May 2, 2018
24958: sql: Add support for parsing ALTER COLUMN TYPE r=bobvawter a=bobvawter

This change adds SQL parsing support for the proposed ALTER COLUMN TYPE syntax
in RFC #24703.  It still returns an unimplemented error message to the caller.

Release note: none

25242: sql: support binary format for DInterval r=justinj a=justinj

Fixes #24525.

Release note (sql change): The binary postgres wire format is now supported for
intervals.

Co-authored-by: Bob Vawter <bob@cockroachlabs.com>
Co-authored-by: Justin Jaffray <justin@cockroachlabs.com>
@craig
Copy link
Copy Markdown
Contributor

craig bot commented May 2, 2018

Build succeeded

@craig craig bot merged commit 13064db into cockroachdb:master May 2, 2018
benesch added a commit to benesch/cockroach that referenced this pull request Jun 6, 2018
The last reference to opt_collate_clause was removed in cockroachdb#24958. Normally
this causes goyacc to throw a "rule not reduced" error, but for some
reason it's not happening until I make some unrelated changes. (Probably
a bug in goyacc.)

Take the opportunity to clean up the naming scheme, too: opt_collate is
used where optional collation is supported, while opt_collate_unimpl is
used where optional collation is not supported.

Release note: None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants