Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: updated the regex expression to correctly identify the table nam… (
#35361) **Description** When the user tries to add a postgres datasource and add any query, if the table name has hyphens in it, then quotes get assigned to first word after the schema and the dot. For example, public."counter"-with-db The quotes should be applied to the whole table name. For example: public."counter-with-db" Fixes #10631 Fixes #30692 **changes in PR:** 1.updated the regec expression to idetify the table name properly with table name consists of hypens. 2.added a test case for this scenario. **snapshots:** before: ![Screenshot from 2024-07-30 17-15-27](https://github.com/user-attachments/assets/98f969da-4cf1-4367-be29-1f3465179a9d) After: ![Screenshot from 2024-08-01 10-46-53](https://github.com/user-attachments/assets/29411eb7-77af-4a10-9988-a0c076043945) Hi @ajinkyakulkarni @rohan-arthur @Nikhil-Nandagopal ,Please review this PR. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary by CodeRabbit - **New Features** - Enhanced handling of table names in the Postgres plugin to support a wider variety of characters, including hyphens and special characters. - Introduced multiple new database tables for improved testing coverage. - **Bug Fixes** - Adjusted table name processing to correctly format names containing a broader range of characters. - **Tests** - Added new tests to verify the structure and integrity of tables with various naming conventions. - Expanded existing tests to accommodate additional table structures. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Loading branch information