File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -3256,7 +3256,7 @@ column_list_item
3256
3256
tail: tail && tail[0 ] && { operator: tail[0 ][1 ], expr: tail[0 ][3 ] },
3257
3257
}
3258
3258
}
3259
- / tbl :ident_type __ DOT pro :(ident_type __ DOT )? __ STAR {
3259
+ / tbl :ident_type __ DOT pro :(ident_without_kw_type __ DOT )? __ STAR {
3260
3260
// => { expr: column_ref; as: null; }
3261
3261
const mid = pro && pro[0 ]
3262
3262
let schema
@@ -4409,7 +4409,7 @@ column_ref
4409
4409
column: ' *'
4410
4410
}
4411
4411
}
4412
- / schema :ident tbl :(__ DOT __ ident ) col :(__ DOT __ column_type ) {
4412
+ / schema :ident tbl :(__ DOT __ ident ) col :(__ DOT __ column_without_kw_type ) {
4413
4413
/* => {
4414
4414
type: 'column_ref';
4415
4415
schema: string;
@@ -4424,7 +4424,7 @@ column_ref
4424
4424
column: { expr: col[3 ] }
4425
4425
};
4426
4426
}
4427
- / tbl :ident __ DOT __ col :column_type {
4427
+ / tbl :ident __ DOT __ col :column_without_kw_type {
4428
4428
/* => {
4429
4429
type: 'column_ref';
4430
4430
table: ident;
Original file line number Diff line number Diff line change @@ -1936,6 +1936,13 @@ describe('Postgres', () => {
1936
1936
'CREATE TABLE "User" ("id" SERIAL NOT NULL, CONSTRAINT "User_pkey" PRIMARY KEY ("id"))'
1937
1937
]
1938
1938
} ,
1939
+ {
1940
+ title : 'reserved keyword as column name' ,
1941
+ sql : [
1942
+ 'select meeting.end from meeting' ,
1943
+ 'SELECT "meeting".end FROM "meeting"'
1944
+ ]
1945
+ } ,
1939
1946
]
1940
1947
neatlyNestTestedSQL ( SQL_LIST )
1941
1948
} )
You can’t perform that action at this time.
0 commit comments