From 5bff103252b9b05285ec86b9518c82e78bac2524 Mon Sep 17 00:00:00 2001 From: lovasoa Date: Sat, 21 Oct 2023 14:16:45 +0200 Subject: [PATCH] test using regexp as an identifier in postgres "regexp" is not a keyword in postgres and can be used as an identifier --- tests/sqlparser_postgres.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/sqlparser_postgres.rs b/tests/sqlparser_postgres.rs index fe336bda7..77e5f3969 100644 --- a/tests/sqlparser_postgres.rs +++ b/tests/sqlparser_postgres.rs @@ -3383,6 +3383,13 @@ fn parse_truncate() { ); } +#[test] +fn parse_select_regexp_as_column_name() { + pg_and_generic().verified_only_select( + "SELECT REGEXP.REGEXP AS REGEXP FROM REGEXP AS REGEXP WHERE REGEXP.REGEXP", + ); +} + #[test] fn parse_create_table_with_alias() { let sql = "CREATE TABLE public.datatype_aliases