Skip to content

Commit 5bff103

Browse files
committed
test using regexp as an identifier in postgres
"regexp" is not a keyword in postgres and can be used as an identifier
1 parent 83cb734 commit 5bff103

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/sqlparser_postgres.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3383,6 +3383,13 @@ fn parse_truncate() {
33833383
);
33843384
}
33853385

3386+
#[test]
3387+
fn parse_select_regexp_as_column_name() {
3388+
pg_and_generic().verified_only_select(
3389+
"SELECT REGEXP.REGEXP AS REGEXP FROM REGEXP AS REGEXP WHERE REGEXP.REGEXP",
3390+
);
3391+
}
3392+
33863393
#[test]
33873394
fn parse_create_table_with_alias() {
33883395
let sql = "CREATE TABLE public.datatype_aliases

0 commit comments

Comments
 (0)