@@ -28,6 +28,7 @@ module.exports = grammar({
2828 [ $ . time ] ,
2929 [ $ . timestamp ] ,
3030 [ $ . grantable_on_function , $ . grantable_on_table ] ,
31+ [ $ . any_identifier , $ . column_identifier ] ,
3132 ] ,
3233
3334 precedences : ( $ ) => [
@@ -779,21 +780,7 @@ module.exports = grammar({
779780 ) ,
780781
781782 _show_statement : ( $ ) =>
782- seq (
783- $ . keyword_show ,
784- choice (
785- $ . _show_create ,
786- $ . keyword_all , // Postgres
787- $ . _show_tables // trino/presto
788- )
789- ) ,
790-
791- _show_tables : ( $ ) =>
792- seq (
793- $ . keyword_tables ,
794- optional ( seq ( $ . keyword_from , $ . _qualified_field ) ) ,
795- optional ( seq ( $ . keyword_like , $ . _expression ) )
796- ) ,
783+ seq ( $ . keyword_show , choice ( $ . _show_create , $ . keyword_all ) ) ,
797784
798785 _show_create : ( $ ) =>
799786 seq (
@@ -2363,7 +2350,7 @@ module.exports = grammar({
23632350
23642351 _column_list : ( $ ) => paren_list ( alias ( $ . _column , $ . column ) , true ) ,
23652352 _column : ( $ ) =>
2366- choice ( $ . any_identifier , alias ( $ . _literal_string , $ . literal ) ) ,
2353+ choice ( $ . column_identifier , alias ( $ . _literal_string , $ . literal ) ) ,
23672354
23682355 _update_statement : ( $ ) => seq ( $ . update , optional ( $ . returning ) ) ,
23692356
@@ -2834,10 +2821,10 @@ module.exports = grammar({
28342821 $ . keyword_end
28352822 ) ,
28362823
2837- field : ( $ ) => field ( "name" , $ . any_identifier ) ,
2824+ field : ( $ ) => field ( "name" , $ . column_identifier ) ,
28382825
28392826 _qualified_field : ( $ ) =>
2840- seq ( optional ( $ . field_qualifier ) , field ( "name" , $ . any_identifier ) ) ,
2827+ seq ( optional ( $ . field_qualifier ) , $ . column_identifier ) ,
28412828
28422829 field_qualifier : ( $ ) =>
28432830 seq ( prec . left ( optional_parenthesis ( $ . object_reference ) ) , "." ) ,
@@ -3531,6 +3518,8 @@ module.exports = grammar({
35313518 bang : ( _ ) => "!" ,
35323519
35333520 any_identifier : ( $ ) => $ . _any_identifier ,
3521+ column_identifier : ( $ ) => $ . _any_identifier ,
3522+
35343523 _any_identifier : ( $ ) =>
35353524 choice (
35363525 $ . _identifier ,
0 commit comments