Escape PostgreSQL options#3800
Conversation
|
This is technically a breaking behavior change as well, because anyone who's already manually escaping options will get different, likely incorrect, results after this patch. This should also document that the strings will be escaped: sqlx/sqlx-postgres/src/options/mod.rs Lines 496 to 504 in e474be6 Alternatively, we don't do this internally but instead expose |
Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
This would leak implementation details and keep a foot gun around, so I’d caution against that. |
If you're fine waiting for this to hit 0.9.0, then it doesn't matter. |
Properly escape PostgreSQL options containing spaces and backslash characters as specified under https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNECT-OPTIONS.
Fixes #2027
Is this a breaking change?
No, this change fixes behavior that I consider a minor edge case.Yes,