tlocke / pg8000

A Pure-Python PostgreSQL Driver
BSD 3-Clause "New" or "Revised" License
515 stars 46 forks source link

Identifier fails to escape restricted keywords #167

Open mcoirad opened 5 days ago

mcoirad commented 5 days ago

Maybe my expectation for this use case incorrect, but I had thought the identifier() function would handle cases of keywords that cannot be used as identifiers:

# expected behavior
identifier('order') == '"order"'
# actual behavior
identifier('order') == 'order'

Let me know if my assumption is incorrect on how to use this.