Skip to content

Incompatibility: ALTER COLUMN DROP DEFAULT #92

@apstndb

Description

@apstndb

This incompatibility is detected by #90.

Spec

https://cloud.google.com/spanner/docs/reference/standard-sql/data-definition-language#alter_table

ALTER TABLE table_name
    action

where action is:
...
    ALTER [ COLUMN ] column_name
      {
        data_type  [ NOT NULL ] [ DEFAULT ( expression ) ]
        | SET OPTIONS ( options_def )
        | SET DEFAULT ( expression )
        | DROP DEFAULT
      }
...

Reproducing input

ALTER TABLE T ALTER COLUMN expr DROP DEFAULT;"

Current behavior

syntax error:testdata/column_default_values.test:6:33: expect ident: BOOL, INT64, FLOAT32, FLOAT64, DATE, TIMESTAMP, NUMERIC, JSON, STRING, BYTES, but: DROP

  6:  ALTER TABLE T ALTER COLUMN expr DROP DEFAULT;
                                      ^~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions