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

SCHEMA in uppercase #11

Open
ghost opened this issue Feb 6, 2019 · 3 comments
Open

SCHEMA in uppercase #11

ghost opened this issue Feb 6, 2019 · 3 comments

Comments

@ghost
Copy link

ghost commented Feb 6, 2019

Hi

Thank you for this wonderful tool.

I have a huge db with camelcase tables - would love to see support for this as well since changing it now is not an option.

Thanks

@isapir
Copy link
Owner

isapir commented Feb 8, 2019

The only way to maintain the CaSe in Postgres is by using quotes, e.g.

CREATE TABLE "Users";

But that means that every time you reference that object you need to use quotes with the exact same CaSe, so this will error as no such table:

-- error, would not work
SELECT * FROM users;

-- error, would not work, even though case is correct
SELECT * FROM Users;

The only way to use it would be to add quotes and the correct case every time:

-- correct CaSe and quotes works
SELECT * FROM "Users";

I can add that feature, but I find this to be unusable. If more people will request it then I will reconsider.

@isapir
Copy link
Owner

isapir commented Feb 8, 2019

You can keep the schema casing unchanged. Simply do not specify any transformation. It will work as the SQL standard is case-insensitive.

The only thing you wouldn't get is the original case in your result sets. All the columns will collapse to lowercase.

@ghost
Copy link
Author

ghost commented Feb 11, 2019

Thank you for this answer - I have problem transfering records - it expects schema with lowercase.
I'll dig futher to find another solution.
Luckily I have another similar db transfer project that has proper casing - will try this with that one.

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

No branches or pull requests

1 participant