Skip to content

Provide function to escape strings provided to Postgres? #575

Closed
@jsdw

Description

@jsdw

I have a program to help instantiate my database, which internally runs:

CREATE USER foo WITH PASSWORD user-input-here

Since prepared statements (and so $1, $2..) do not work in this context, is there a way that I can escape the password string provided by the user before passing it to the above?

Might this be a useful piece of functionality to provide from this library? (I appreciate that its use should be discouraged).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions