Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.
This repository was archived by the owner on Aug 19, 2025. It is now read-only.

KeyError when using returning(literal_column('*')) with insert #190

@kamilglod

Description

@kamilglod

slqlalchemy supports "*" as a returning value, however when I'm using it with postgres backend

row = await db.fetch_one(table.insert().values(**values).returning(literal_column('*')))

and then try to get row data KeyError shows up in this line https://github.com/encode/databases/blob/master/databases/backends/postgres.py#L105
That's because self._column_map has value {'*': (0, NullType())}

So there should be probably some extra check for the wildcard column.

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