-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
Azure pg/mysql not supportable? #141
Comments
What do you mean by that? If you're trying to pass a non-URI-formatted string to Are you not able to pass a constructed URI like this? URI.new(scheme: "postgres", host: "autoess-pg.postgres.database.azure.com", dbname: "{your_database}", user: "admin1@autoess-pg", password: "{your_password}") As far as I can tell, URI encoding should correctly handle Still: URI-based connection configuration isn't defined in any formal specification. It probably shouldn't be the only way to configure a database driver. |
Yeah, the URI route was the way to go.
The URI string ends up as Irregardless, no amount of twiddling the Azure Postgresql DB resulted in anything but a request for auth frame Frame::Authentication::Type::CleartextPassword. So I guess the answer, at least for Azure Postgresql, is Lots of chatter on stackoverflow etc on md5 / cleartext being the same with TLS but I'll open a ticket with Azure on this. |
The big issue, azure style, is there is no access to pg_hba.conf... |
For cleartext support, see: will/crystal-pg#192 |
Oops, I already filed crystal-pg PR 218 which fixes it. |
Are we good to close this one? Or are we still missing something? |
Should be fine to close, will/crystal-pg#218 has some great info on the topic |
Azure Postgres (and mysql) connections all have user names that have '@' in them - that's just how it is with azure.
Go's libpg allows the driver and the connection string to be separated as URI'izing them doesn't always work especially if both the user and password have '@' in them. I need the non uri form shown in the example.
Crystal's will/pg also accounts for this but I can see no way to create a connection with crystal-db that doesn't try to force
postgres://
(causing url encoding) to be used to create a connection.For instance, this (taken right from azure portal) is the azure suggested connection string for my db:
The forced url encoding done by
build_database
makes the parsing by the actual driver fail.No amount of massaging seems to work. I put in the following debug statement in my lib/pg/lib/pg/connection.cr
which emits scrambled eggs:
which I'm sure reflects the pool creation.
Is there a workaround where I can pass a string and the driver that I'm missing?
The text was updated successfully, but these errors were encountered: