Skip to content

Support postgresql on commit for ctas #1274

Open
@fdzuJ

Description

@fdzuJ

Add support for postgresql [ ON COMMIT { PRESERVE ROWS | DELETE ROWS | DROP } ]. Currently panics:

use sqlparser::dialect::PostgreSqlDialect;
use sqlparser::parser::Parser;
 
fn main() {
    let sql = "create local temporary table test on commit preserve rows as select 1 as a;";
 
    let dialect = PostgreSqlDialect {};
 
    let ast = Parser::parse_sql(&dialect, sql).unwrap();
 
    for stmt in ast.iter() {
        println!("{}", stmt.to_string())
    }
}

ParserError("Expected end of statement, found: as at Line: 1, Column 59")

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