Skip to content

[Postgres Create Function]: does not support $$ #754

Closed
@zidaye

Description

@zidaye
fn test() {
    let sql = "CREATE OR REPLACE FUNCTION increment(i INTEGER) RETURNS INTEGER  LANGUAGE plpgsql AS $$ BEGIN RETURN i + 1; END; $$;";

    let dialect = PostgreSqlDialect {};
    let ast = Parser::parse_sql(&dialect, sql).unwrap();
    println!("AST: {:?}", ast);
}

The result after the test case is executed:

panicked at 'called `Result::unwrap()` on an `Err` value: ParserError("Expected literal string, found: $")', examples/parse_select.rs:23:48

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