psqlpy icon indicating copy to clipboard operation
psqlpy copied to clipboard

Support "quoting" column names

Open xiaoxianma opened this issue 1 year ago • 2 comments
trafficstars

When passing a "quoting" column name to binary_copy_to_table, psqlpy raises syntax error. Callers have to wrap those columns in a double quote by themselves. It would be great to support this in the library.

workaround,

async def main():
    res = await conn.binary_copy_to_table(
        columns=[
            '"a-b"',
        ],
        ...
    )

xiaoxianma avatar Jul 21 '24 23:07 xiaoxianma

https://docs.rs/pg_escape/latest/pg_escape/ may help

bitner avatar Nov 13 '24 16:11 bitner

@bitner Thanks for the information!

chandr-andr avatar Nov 13 '24 16:11 chandr-andr