Skip to content

cannot convert &str to Postgres reg* types #1041

Open
@dmfay

Description

@dmfay

A query select $1::regclass (textual representation of a table oid) passed an &str tablename yields the error:

error serializing parameter 0: cannot convert between the Rust type `&str` and the Postgres type `regclass`

It's easy to work around (select $1::text::regclass) so I'm raising this issue to document that, but it'd be nice to get the conversions set up for regclass, regtype, regproc, regnamespace, etc!

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