@@ -3129,3 +3129,87 @@ SELECT col1, col2, col3 into alpha, beta, gamma FROM my_table;
31293129 (relation
31303130 (object_reference
31313131 name: (identifier))))))
3132+
3133+ ================================================================================
3134+ Select from table with bare identifier
3135+ ================================================================================
3136+
3137+ SELECT * FROM table_name;
3138+
3139+ --------------------------------------------------------------------------------
3140+
3141+ (program
3142+ (statement
3143+ (select
3144+ (keyword_select)
3145+ (select_expression
3146+ (term
3147+ value: (all_fields))))
3148+ (from
3149+ (keyword_from)
3150+ (relation
3151+ (object_reference
3152+ name: (identifier))))))
3153+
3154+ ================================================================================
3155+ Select from table with backtick-quoted identifier
3156+ ================================================================================
3157+
3158+ SELECT * FROM `table_name`;
3159+
3160+ --------------------------------------------------------------------------------
3161+
3162+ (program
3163+ (statement
3164+ (select
3165+ (keyword_select)
3166+ (select_expression
3167+ (term
3168+ value: (all_fields))))
3169+ (from
3170+ (keyword_from)
3171+ (relation
3172+ (object_reference
3173+ name: (identifier))))))
3174+
3175+ ================================================================================
3176+ Select from table with double-quoted identifier
3177+ ================================================================================
3178+
3179+ SELECT * FROM "table_name";
3180+
3181+ --------------------------------------------------------------------------------
3182+
3183+ (program
3184+ (statement
3185+ (select
3186+ (keyword_select)
3187+ (select_expression
3188+ (term
3189+ value: (all_fields))))
3190+ (from
3191+ (keyword_from)
3192+ (relation
3193+ (object_reference
3194+ name: (identifier))))))
3195+
3196+ ================================================================================
3197+ Select from table with identifiers containing hyphens, dots, or other special characters within backticks
3198+ ================================================================================
3199+
3200+ SELECT * FROM `complex-database.schema_name.table_name`;
3201+
3202+ --------------------------------------------------------------------------------
3203+
3204+ (program
3205+ (statement
3206+ (select
3207+ (keyword_select)
3208+ (select_expression
3209+ (term
3210+ value: (all_fields))))
3211+ (from
3212+ (keyword_from)
3213+ (relation
3214+ (object_reference
3215+ name: (identifier))))))
0 commit comments