Skip to content

PgConnectOptions.options are not URL encoded #2027

Open
@rudolphfroger-ds

Description

@rudolphfroger-ds

write!(options_str, "-c {}={}", k, v).expect("failed to write an option to the string");

Test case:

let pg_connect_opts = PgConnectOptions::default()
    .database(db_name)
    .options([("default_transaction_isolation", "repeatable read")]);

Connecting with these options will given an error that "repeatable" is not a valid isolation level.

I think the solution is to URL encode options.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions