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

[NEOS-1396] Add support for double quotes in schema and tables for Postgres #2591

Open
nickzelei opened this issue Sep 3, 2024 · 0 comments
Labels
bug Something isn't working Fast Follow Created by Linear-GitHub Sync Hacktober Created by Linear-GitHub Sync Postgresql Created by Linear-GitHub Sync

Comments

@nickzelei
Copy link
Member

nickzelei commented Sep 3, 2024

We have support for special characters, however, this breaks down when building many of our queries because double quotes need to be escaped properly, which is done by adding an extra double quote.

CREATE TABLE "user""s_data@" (id TEXT NOT NULL PRIMARY key);

This creates a table called user"s_data@

Goqu only knows how to wrap tables in the correct delimiter (for Postgres, it is a double quote), but in order for the statement to be valid, we have to add in an extra " wherever we find one.

This change will have to be made anywhere that we are using Goqu.

Well known places:

  • sqlmanager_postgres
  • querybuilder2

Keep an eye out for:

Add support for escaping double quotes in Postgres Identifiers · Issue #428 · doug-martin/goqu

From SyncLinear.com | NEOS-1396

@nickzelei nickzelei added Fast Follow Created by Linear-GitHub Sync Postgresql Created by Linear-GitHub Sync labels Sep 3, 2024
@nickzelei nickzelei added the bug Something isn't working label Sep 3, 2024
@nickzelei nickzelei added this to the v.28 milestone Sep 9, 2024
@nickzelei nickzelei removed this from the v.28 milestone Sep 17, 2024
@nickzelei nickzelei added the Hacktober Created by Linear-GitHub Sync label Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Fast Follow Created by Linear-GitHub Sync Hacktober Created by Linear-GitHub Sync Postgresql Created by Linear-GitHub Sync
Projects
None yet
Development

No branches or pull requests

1 participant