Skip to content

CREATE TYPE without AS fails parsing. #2092

@LucaCappelletti94

Description

@LucaCappelletti94

At the time of writing, the following valid syntax fails:

CREATE TYPE CAS;
let create_type_without_as = "CREATE TYPE CAS;";
    match verified_stmt(create_type_without_as) {
        Statement::CreateType {
            name,
            representation,
        } => {
            assert_eq_vec(&["CAS"], &name.0);
        }
        _ => unreachable!(),
    }
CREATE TYPE CAS;: ParserError("Expected: AS, found: ;")

I will make a PR shortly to fix this. I am starting to work more with pgrx type definitions, so I may find myself subsequently extending the CREATE TYPE syntax a few times.

Best,
Luca

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