Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support selecting a PostgreSQL DB schema if found #74

Open
1saifj opened this issue Oct 17, 2024 · 1 comment · May be fixed by #76
Open

Support selecting a PostgreSQL DB schema if found #74

1saifj opened this issue Oct 17, 2024 · 1 comment · May be fixed by #76

Comments

@1saifj
Copy link

1saifj commented Oct 17, 2024

Is your feature request related to a problem? Please describe.
I'm always frustrated when the current DSN (Data Source Name) for PostgreSQL database as it does not support specifying a schema for databases that require schema selection. This results in needing to manually set the schema after establishing a connection or handling it separately in the code.

Describe the solution you'd like
I would like to have the ability to specify a schema directly within the DSN so that when a connection is established, the appropriate schema is selected automatically.

Describe alternatives you've considered
An alternative solution would be to execute a query to set the schema immediately after the connection is established, but this adds complexity and overhead to the connection process.

Additional context
This feature would streamline connections for databases with multiple schemas and reduce manual configuration.

@1saifj 1saifj changed the title support selecting a db schema if found Support selecting a DB schema if found Oct 17, 2024
@1saifj 1saifj changed the title Support selecting a DB schema if found Support selecting a PostgreSQL DB schema if found Oct 17, 2024
@zhufuyi
Copy link
Owner

zhufuyi commented Oct 18, 2024

On the generate code page, the next Sponge release adds the specified schema parameters, such as root:123456@(192.168.3.37:5432)/account?search_path=job

@1saifj 1saifj linked a pull request Oct 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants